From 103587c2d5f9deb20e549a86cdf5023b429cc6a1 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 18 Mar 2015 18:23:54 -0400 Subject: Wrote an XML Schema describing maps file and also changed the spec a bit --- tools/mapedit/src/widget.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tools/mapedit/src/widget.cpp') diff --git a/tools/mapedit/src/widget.cpp b/tools/mapedit/src/widget.cpp index 7f90880..fa0af39 100644 --- a/tools/mapedit/src/widget.cpp +++ b/tools/mapedit/src/widget.cpp @@ -75,30 +75,30 @@ void MapeditWidget::OnPaint(wxPaintEvent&) RenderMap(map, dc, tiles_dc); - if (map->getLeftMoveType() == Map::MoveType::Warp) + if (map->getAdjacent(Map::MoveDir::Left).type == Map::MoveType::Warp) { - auto tomap = map->getWorld()->getMap(map->getLeftMoveMapID()); + auto tomap = map->getWorld()->getMap(map->getAdjacent(Map::MoveDir::Left).map); RenderMap(tomap.get(), dc, tiles_dc, -EDITOR_SPACING_X, EDITOR_SPACING_Y, false); } - if (map->getRightMoveType() == Map::MoveType::Warp) + if (map->getAdjacent(Map::MoveDir::Right).type == Map::MoveType::Warp) { - auto tomap = map->getWorld()->getMap(map->getRightMoveMapID()); + auto tomap = map->getWorld()->getMap(map->getAdjacent(Map::MoveDir::Right).map); RenderMap(tomap.get(), dc, tiles_dc, EDITOR_WIDTH-EDITOR_SPACING_X, EDITOR_SPACING_Y, false); } - if (map->getUpMoveType() == Map::MoveType::Warp) + if (map->getAdjacent(Map::MoveDir::Up).type == Map::MoveType::Warp) { - auto tomap = map->getWorld()->getMap(map->getUpMoveMapID()); + auto tomap = map->getWorld()->getMap(map->getAdjacent(Map::MoveDir::Up).map); RenderMap(tomap.get(), dc, tiles_dc, EDITOR_SPACING_X, -EDITOR_SPACING_Y, false); } - if (map->getDownMoveType() == Map::MoveType::Warp) + if (map->getAdjacent(Map::MoveDir::Down).type == Map::MoveType::Warp) { - auto tomap = map->getWorld()->getMap(map->getDownMoveMapID()); + auto tomap = map->getWorld()->getMap(map->getAdjacent(Map::MoveDir::Down).map); RenderMap(tomap.get(), dc, tiles_dc, EDITOR_SPACING_X, EDITOR_HEIGHT-EDITOR_SPACING_Y, false); } -- cgit 1.4.1