summaryrefslogtreecommitdiffstats
path: root/pokemod/CoinItem.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-06-01 02:54:29 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-06-01 02:54:29 +0000
commitf71140fae5218ee9839ffcd4ec83abfded5124f4 (patch)
tree9af8f2174728cedb93580411223bc59fd9a86d0a /pokemod/CoinItem.cpp
parent9e28e6ecd358a9801ad25914d3e8cca7b6d7f4f7 (diff)
downloadsigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.tar.gz
sigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.tar.xz
sigen-f71140fae5218ee9839ffcd4ec83abfded5124f4.zip
Added Map and Tile, added Hat class, and fixed up some other minor things
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@17 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/CoinItem.cpp')
-rw-r--r--pokemod/CoinItem.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/pokemod/CoinItem.cpp b/pokemod/CoinItem.cpp
index 2325a2f6..62b3371f 100644
--- a/pokemod/CoinItem.cpp
+++ b/pokemod/CoinItem.cpp
@@ -28,8 +28,8 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
PokeGen::PokeMod::CoinItem::CoinItem(const unsigned _id)
{
LogCtor("CoinItem", _id);
- type = 0;
- object = -1;
+ type = CIT_ITEM;
+ object = UINT_MAX;
amount = 1;
cost = 0;
id = _id;
@@ -50,7 +50,6 @@ PokeGen::PokeMod::CoinItem::~CoinItem()
void PokeGen::PokeMod::CoinItem::Validate()
{
- isValid = true;
LogValidateStart("CoinItem", id);
if (type == CIT_ITEM)
{
@@ -84,7 +83,6 @@ void PokeGen::PokeMod::CoinItem::Validate()
#ifdef PG_DEBUG_WINDOW
void PokeGen::PokeMod::CoinItem::Validate(const wxListBox &output)
{
- isValid = true;
LogValidateStart("CoinItem", id);
if (type == CIT_ITEM)
{
@@ -133,7 +131,7 @@ void PokeGen::PokeMod::CoinItem::ImportIni(Ini &ini, const unsigned _id)
else
id = _id;
ini.GetValue("type", type, CIT_ITEM);
- ini.GetValue("object", object, -1);
+ ini.GetValue("object", object);
ini.GetValue("amount", amount, 1);
ini.GetValue("cost", cost, 0);
LogImportOver("CoinItem", id);
@@ -159,11 +157,11 @@ void PokeGen::PokeMod::CoinItem::SetType(const unsigned t)
if (t < CIT_END)
{
type = t;
- object = -1;
+ object = UINT_MAX;
}
}
-void PokeGen::PokeMod::CoinItem::SetObject(const int o)
+void PokeGen::PokeMod::CoinItem::SetObject(const unsigned o)
{
LogSetVar("CoinItem", id, "object", o);
if (((type == CIT_ITEM) && curPokeMod.GetItem(o)) || ((type == CIT_POKEMON) && curPokeMod.GetPokemon(o)))
@@ -198,7 +196,7 @@ unsigned PokeGen::PokeMod::CoinItem::GetType() const
return type;
}
-int PokeGen::PokeMod::CoinItem::GetObject() const
+unsigned PokeGen::PokeMod::CoinItem::GetObject() const
{
LogFetchVar("CoinItem", id, "object", object);
return object;