diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-04-27 15:15:17 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-04-27 15:15:17 +0000 |
| commit | 807071d35159de0660f9df31c48d5bf895ca3622 (patch) | |
| tree | a1e9dbdc1e58b91cd2e4a5e472597b0204ccb41d /pokemodr/MapWarpUI.cpp | |
| parent | f444f5a45e9325644a360f656176d47d7f540f52 (diff) | |
[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
Diffstat (limited to 'pokemodr/MapWarpUI.cpp')
| -rw-r--r-- | pokemodr/MapWarpUI.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
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 <http://www.gnu.org/licenses/>. */ -// Qt includes -#include <QListWidgetItem> - -// General includes -#include <BugCatcher.h> -#include <Exception.h> +// Header include +#include "MapWarpUI.h" // Pokemod includes -#include <Dialog.h> -#include <Pokemod.h> -#include <Map.h> +#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 <QListWidgetItem> 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<const Pokemod*>(m_warp->pokemod())->mapCount(); ++i) { - const Map* map = m_warp->pokemod()->map(i); + const Map* map = static_cast<const Pokemod*>(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<const Pokemod*>(m_warp->pokemod())->dialogCount(); ++i) { - const Dialog* dialog = m_warp->pokemod()->dialog(i); + const Dialog* dialog = static_cast<const Pokemod*>(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<const Pokemod*>(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<const Pokemod*>(m_warp->pokemod())->map(index); for (int i = 0; i < map->warpCount(); ++i) { const MapWarp* warp = map->warp(i); |
