diff options
Diffstat (limited to 'pokemod/MapWarp.cpp')
| -rw-r--r-- | pokemod/MapWarp.cpp | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/pokemod/MapWarp.cpp b/pokemod/MapWarp.cpp index 5098a86d..81878de7 100644 --- a/pokemod/MapWarp.cpp +++ b/pokemod/MapWarp.cpp @@ -6,19 +6,18 @@ // Created: Fri June 1 2007 20:46:23
// Copyright: ©2007 Nerdy Productions
// Licence:
-// This program is free software; you can redistribute it and/or modify
+// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
+// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+// with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////////////////
#include "MapWarp.h"
@@ -33,7 +32,7 @@ PokeGen::PokeMod::MapWarp::MapWarp(const Pokemod *par, const unsigned _id) : directionOut(UINT_MAX),
warpType(UINT_MAX),
isBiking(false),
- isFlash(false), + isFlash(false),
isFoggy(false),
toMap(UINT_MAX),
toWarp(UINT_MAX),
@@ -128,7 +127,7 @@ void PokeGen::PokeMod::MapWarp::ImportIni(Ini &ini, const unsigned _id) ini.GetValue("warpType", warpType);
ini.GetValue("isBiking", isBiking, false);
ini.GetValue("isFlash", isFlash, false);
- ini.GetValue("isFoggy", isFoggy, false); + ini.GetValue("isFoggy", isFoggy, false);
ini.GetValue("toMap", toMap);
ini.GetValue("toWarp", toWarp);
ini.GetValue("workingFlag-f", i, 0);
@@ -138,7 +137,7 @@ void PokeGen::PokeMod::MapWarp::ImportIni(Ini &ini, const unsigned _id) LogImportOver("MapWarp", id, name);
}
-void PokeGen::PokeMod::MapWarp::ExportIni(std::ofstream &fout, const String &map) const
+void PokeGen::PokeMod::MapWarp::ExportIni(QFile &fout, const QString &map) const
{
LogExportStart("MapWarp", id, name);
Ini exMapWarp("mapWarp " + map);
@@ -152,7 +151,7 @@ void PokeGen::PokeMod::MapWarp::ExportIni(std::ofstream &fout, const String &map exMapWarp.AddField("directionOut", directionOut);
exMapWarp.AddField("warpType", warpType);
exMapWarp.AddField("isBiking", isBiking);
- exMapWarp.AddField("isFlash", isFlash); + exMapWarp.AddField("isFlash", isFlash);
exMapWarp.AddField("isFoggy", isFoggy);
exMapWarp.AddField("toMap", toMap);
exMapWarp.AddField("toWarp", toWarp);
@@ -163,7 +162,7 @@ void PokeGen::PokeMod::MapWarp::ExportIni(std::ofstream &fout, const String &map LogExportOver("MapWarp", id, name);
}
-void PokeGen::PokeMod::MapWarp::SetName(const String &n)
+void PokeGen::PokeMod::MapWarp::SetName(const QString &n)
{
LogSetVar("MapWarp", id, "name", n);
name = n;
@@ -224,7 +223,7 @@ void PokeGen::PokeMod::MapWarp::SetDirectionOut(const unsigned d) directionOut = d;
}
-void PokeGen::PokeMod::MapWarp::SetDirectionOut(const String &d)
+void PokeGen::PokeMod::MapWarp::SetDirectionOut(const QString &d)
{
SetDirectionOut(FindIn(DIR_END, d, DirectionStr));
}
@@ -236,7 +235,7 @@ void PokeGen::PokeMod::MapWarp::SetWarpType(const unsigned w) warpType = w;
}
-void PokeGen::PokeMod::MapWarp::SetWarpType(const String &w)
+void PokeGen::PokeMod::MapWarp::SetWarpType(const QString &w)
{
SetWarpType(FindIn(WT_END, w, WarpTypeStr));
}
@@ -253,12 +252,12 @@ void PokeGen::PokeMod::MapWarp::SetIsFlash(const bool i) isFlash = i;
}
-void PokeGen::PokeMod::MapWarp::SetIsFoggy(const bool i) -{ - LogSetVar("MapWarp", id, "isFoggy", i, name); - isFoggy = i; -} - +void PokeGen::PokeMod::MapWarp::SetIsFoggy(const bool i)
+{
+ LogSetVar("MapWarp", id, "isFoggy", i, name);
+ isFoggy = i;
+}
+
void PokeGen::PokeMod::MapWarp::SetToMap(const unsigned t)
{
LogSetVar("MapWarp", id, "toMap", t, name);
@@ -269,7 +268,7 @@ void PokeGen::PokeMod::MapWarp::SetToMap(const unsigned t) }
}
-void PokeGen::PokeMod::MapWarp::SetToMap(const String &t)
+void PokeGen::PokeMod::MapWarp::SetToMap(const QString &t)
{
LogSetVar("MapWarp", id, "toMap string", t, name);
if (const Map *m = pokemod->GetMap(t))
@@ -289,7 +288,7 @@ void PokeGen::PokeMod::MapWarp::SetToWarp(const unsigned t) }
}
-void PokeGen::PokeMod::MapWarp::SetToWarp(const String &t)
+void PokeGen::PokeMod::MapWarp::SetToWarp(const QString &t)
{
LogSetVar("MapWarp", id, "toWarp string", t, name);
if (const Map *m = pokemod->GetMap(toMap))
@@ -323,7 +322,7 @@ void PokeGen::PokeMod::MapWarp::SetWorkingFlagStatus(const unsigned s) workingFlag.SetStatus(s);
}
-void PokeGen::PokeMod::MapWarp::SetWorkingFlagStatus(const String &s)
+void PokeGen::PokeMod::MapWarp::SetWorkingFlagStatus(const QString &s)
{
SetWorkingFlagStatus(FindIn(FV_END, s, FlagValueStr));
}
@@ -335,7 +334,7 @@ void PokeGen::PokeMod::MapWarp::SetDialog(const unsigned d) dialog = d;
}
-PokeGen::PokeMod::String PokeGen::PokeMod::MapWarp::GetName() const
+QString PokeGen::PokeMod::MapWarp::GetName() const
{
LogFetchVar("MapWarp", id, "name", name);
return name;
@@ -389,7 +388,7 @@ unsigned PokeGen::PokeMod::MapWarp::GetDirectionOut() const return directionOut;
}
-PokeGen::PokeMod::String PokeGen::PokeMod::MapWarp::GetDirectionOutString() const
+QString PokeGen::PokeMod::MapWarp::GetDirectionOutString() const
{
LogFetchVar("MapWarp", id, "directionOut string", directionOut, name);
if (directionOut < DIR_END)
@@ -403,7 +402,7 @@ unsigned PokeGen::PokeMod::MapWarp::GetWarpType() const return warpType;
}
-PokeGen::PokeMod::String PokeGen::PokeMod::MapWarp::GetWarpTypeString() const
+QString PokeGen::PokeMod::MapWarp::GetWarpTypeString() const
{
LogFetchVar("MapWarp", id, "warpType string", warpType, name);
if (warpType < WT_END)
@@ -423,19 +422,19 @@ bool PokeGen::PokeMod::MapWarp::GetIsFlash() const return isFlash;
}
-bool PokeGen::PokeMod::MapWarp::GetIsFoggy() const -{ - LogFetchVar("MapWarp", id, "isFoggy", isFoggy, name); - return isFoggy; -} - +bool PokeGen::PokeMod::MapWarp::GetIsFoggy() const
+{
+ LogFetchVar("MapWarp", id, "isFoggy", isFoggy, name);
+ return isFoggy;
+}
+
unsigned PokeGen::PokeMod::MapWarp::GetToMap() const
{
LogFetchVar("MapWarp", id, "toMap", toMap, name);
return toMap;
}
-PokeGen::PokeMod::String PokeGen::PokeMod::MapWarp::GetToMapString() const
+QString PokeGen::PokeMod::MapWarp::GetToMapString() const
{
LogFetchVar("MapWarp", id, "toMap string", toMap, name);
if (const Map *m = pokemod->GetMap(toMap))
@@ -449,7 +448,7 @@ unsigned PokeGen::PokeMod::MapWarp::GetToWarp() const return toWarp;
}
-PokeGen::PokeMod::String PokeGen::PokeMod::MapWarp::GetToWarpString() const
+QString PokeGen::PokeMod::MapWarp::GetToWarpString() const
{
LogFetchVar("MapWarp", id, "toWarp string", toWarp, name);
if (const Map *m = pokemod->GetMap(toMap))
@@ -478,7 +477,7 @@ unsigned PokeGen::PokeMod::MapWarp::GetWorkingFlagStatus() const return workingFlag.GetStatus();
}
-PokeGen::PokeMod::String PokeGen::PokeMod::MapWarp::GetWorkingFlagStatusString() const
+QString PokeGen::PokeMod::MapWarp::GetWorkingFlagStatusString() const
{
LogFetchVar("MapWarp", id, "workingFlag status string", workingFlag.GetStatus(), name);
return workingFlag.GetStatusString();
@@ -490,7 +489,7 @@ unsigned PokeGen::PokeMod::MapWarp::GetDialog() const return dialog;
}
-PokeGen::PokeMod::String PokeGen::PokeMod::MapWarp::GetDialogString() const
+QString PokeGen::PokeMod::MapWarp::GetDialogString() const
{
LogFetchVar("MapWarp", id, "dialog string", dialog, name);
if (const Dialog *d = pokemod->GetDialog(dialog))
|
