From 65cc463f1d91fe99acf1c4dd9bce7e0038593022 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 3 Jul 2007 04:20:36 +0000 Subject: Fixed Logging, minor fixes, got rid of NatureEffect, and started migration from wxGTK to Qt git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@22 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/MapWarp.cpp | 72 +++++++++++++---------------------------------------- 1 file changed, 17 insertions(+), 55 deletions(-) (limited to 'pokemod/MapWarp.cpp') diff --git a/pokemod/MapWarp.cpp b/pokemod/MapWarp.cpp index eb366464..5098a86d 100644 --- a/pokemod/MapWarp.cpp +++ b/pokemod/MapWarp.cpp @@ -33,7 +33,8 @@ 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), workingFlag(0, 0), @@ -102,59 +103,6 @@ void PokeGen::PokeMod::MapWarp::Validate() LogValidateOver("MapWarp", id, isValid, name); } -#ifdef PG_DEBUG_WINDOW -void PokeGen::PokeMod::MapWarp::Validate(const wxListBox &output) -{ - LogValidateStart("MapWarp", id, name); - if (name == "") - { - LogVarNotSet("MapWarp", id, "name"); - output.Append(ConsoleLogVarNotSet("MapWarp", id, "name")); - isValid = false; - } - if (!fromUp && !fromDown && !fromLeft && !fromRight) - { - LogVarNotSet("MapWarp", id, "directions", name); - output.Append(ConsoleLogVarNotSet("MapWarp", id, "directions", name)); - isValid = false; - } - if (DIR_END_NONE <= directionOut) - { - LogVarNotValid("MapWarp", id, "directionOut", name); - output.Append(ConsoleLogVarNotValid("MapWarp", id, "directionOut", name)); - isValid = false; - } - if (WT_END <= warpType) - { - LogVarNotValid("MapWarp", id, "warpType", name); - output.Append(ConsoleLogVarNotValid("MapWarp", id, "warpType", name)); - isValid = false; - } - if (const Map *m = pokemod->GetMap(toMap)) - { - if (!m->GetMapWarp(toWarp)) - { - LogVarNotValid("MapWarp", id, "toWarp"); - output.Append(ConsoleLogVarNotValid("MapWarp", id, "toWarp")); - isValid = false; - } - } - else - { - LogVarNotValid("MapWarp", id, "toMap"); - output.Append(ConsoleLogVarNotValid("MapWarp", id, "toMap")); - isValid = false; - } - if (!pokemod->GetDialog(dialog)) - { - LogVarNotValid("MapWarp", id, "dialog"); - output.Append(ConsoleLogVarNotValid("MapWarp", id, "dialog")); - isValid = false; - } - LogValidateOver("MapWarp", id, isValid, name); -} -#endif - void PokeGen::PokeMod::MapWarp::ImportIni(Ini &ini, const unsigned _id) { LogImportStart("MapWarp"); @@ -180,6 +128,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("toMap", toMap); ini.GetValue("toWarp", toWarp); ini.GetValue("workingFlag-f", i, 0); @@ -203,7 +152,8 @@ 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); exMapWarp.AddField("workingFlag-f", workingFlag.GetFlag()); @@ -303,6 +253,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::SetToMap(const unsigned t) { LogSetVar("MapWarp", id, "toMap", t, name); @@ -467,6 +423,12 @@ bool PokeGen::PokeMod::MapWarp::GetIsFlash() const return isFlash; } +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); -- cgit