From 807071d35159de0660f9df31c48d5bf895ca3622 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 27 Apr 2008 15:15:17 +0000 Subject: [FIX] Pokemod objects now know about parents [FIX] Project includes are now relative [FIX] Headers included for better detection of invalid headers [FIX] Validation code commented out so it can be done better git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@111 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemodr/MapWarpUI.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'pokemodr/MapWarpUI.cpp') diff --git a/pokemodr/MapWarpUI.cpp b/pokemodr/MapWarpUI.cpp index 4d2d4f51..9eb84fe8 100644 --- a/pokemodr/MapWarpUI.cpp +++ b/pokemodr/MapWarpUI.cpp @@ -15,20 +15,20 @@ * with this program. If not, see . */ -// Qt includes -#include - -// General includes -#include -#include +// Header include +#include "MapWarpUI.h" // Pokemod includes -#include -#include -#include +#include "../pokemod/Dialog.h" +#include "../pokemod/Pokemod.h" +#include "../pokemod/Map.h" -// Header includeo -#include "MapWarpUI.h" +// General includes +#include "../general/BugCatcher.h" +#include "../general/Exception.h" + +// Qt includes +#include MapWarpUI::MapWarpUI(MapWarp* warp, QWidget* parent) : ObjectUI(parent), @@ -52,16 +52,16 @@ void MapWarpUI::initGui() void MapWarpUI::refreshGui() { varToMap->clear(); - for (int i = 0; i < m_warp->pokemod()->mapCount(); ++i) + for (int i = 0; i < static_cast(m_warp->pokemod())->mapCount(); ++i) { - const Map* map = m_warp->pokemod()->map(i); + const Map* map = static_cast(m_warp->pokemod())->map(i); varToMap->addItem(map->name()); varToMap->setItemData(i, map->id()); } varDialog->clear(); - for (int i = 0; i < m_warp->pokemod()->dialogCount(); ++i) + for (int i = 0; i < static_cast(m_warp->pokemod())->dialogCount(); ++i) { - const Dialog* dialog = m_warp->pokemod()->dialog(i); + const Dialog* dialog = static_cast(m_warp->pokemod())->dialog(i); varDialog->addItem(dialog->dialog().mid(0, 25)); varDialog->setItemData(i, dialog->id()); } @@ -84,12 +84,12 @@ void MapWarpUI::setGui() if (resetWarps) { varToWarp->clear(); - int index = m_warp->pokemod()->mapIndex(m_warp_mod->toMap()); + int index = static_cast(m_warp->pokemod())->mapIndex(m_warp_mod->toMap()); if (index != INT_MAX) { try { - const Map* map = m_warp->pokemod()->map(index); + const Map* map = static_cast(m_warp->pokemod())->map(index); for (int i = 0; i < map->warpCount(); ++i) { const MapWarp* warp = map->warp(i); -- cgit