summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
commit8bde9095c5840b8d62ebafe11beaed98877d6ac2 (patch)
tree537f717a339d1247cae222eb7a354ea5dbe8babf /src/resources/iteminfo.h
parenta246c08cef5e4d598fc07a681eb971bfbcf01519 (diff)
downloadMana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.gz
Mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.bz2
Mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.xz
Mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.zip
* Made Sprite into an interface implemented by both FloorItem and Being, which
hook themselves into the map on construction. The improved fringe layer is working as expected now. * Made sure TMW compiles without warnings even when using "-Wconversion -Wshadow -Wcast-qual -Wwrite-strings -ansi -pedantic", lots of cleanups. * Added two new small tilesets that contain the desert tiles that are twice and three times the height of a normal tile. One well in new_3-1 has been converted to use the new double tiles for testing purposes.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r--src/resources/iteminfo.h96
1 files changed, 62 insertions, 34 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 937911af..c515fd1c 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -37,52 +37,80 @@ class ItemInfo
/**
* Constructor.
*/
- ItemInfo();
+ ItemInfo():
+ mImage(0),
+ mArt(0),
+ mType(0),
+ mWeight(0),
+ mSlot(0)
+ {
+ }
- void setImage(short image);
-
- short getImage();
-
- void setArt(short art);
-
- short getArt();
-
- void setName(const std::string &name);
-
- std::string getName();
-
- void setDescription(const std::string &description);
+ void
+ setArt(short art) { mArt = art; }
- std::string getDescription();
+ short
+ getArt() { return mArt; }
- void setEffect(const std::string &effect);
+ void
+ setName(const std::string &name) { mName = name; }
- std::string getEffect();
+ std::string
+ getName() { return mName; }
- void setType(short type);
+ void
+ setImage(short image) { mImage = image; }
- short getType();
-
- void setWeight(short weight);
+ short
+ getImage() { return mImage; }
- short getWeight();
-
- void setSlot(char slot);
-
- char getSlot();
+ void
+ setDescription(const std::string &description)
+ {
+ mDescription = description;
+ }
+
+ std::string
+ getDescription() { return mDescription; }
+
+ void
+ setEffect(const std::string &effect) { mEffect = effect; }
+
+ std::string
+ getEffect() { return mEffect; }
+
+ void
+ setType(short type) { mType = type; }
+
+ short
+ getType() { return mType; }
+
+ void
+ setWeight(short weight) { mWeight = weight; }
+
+ short
+ getWeight() { return mWeight; }
+
+ void
+ setSlot(char slot) { mSlot = slot; }
+
+ char
+ getSlot() { return mSlot; }
protected:
/**
* Destructor.
*/
- ~ItemInfo();
-
- short image, art;
- std::string name;
- std::string description;
- std::string effect;
- short type, weight;
- char slot;
+ ~ItemInfo() {}
+
+ short mImage;
+ short mArt;
+ std::string mName;
+ std::string mDescription;
+ std::string mEffect;
+ short mType;
+ short mWeight;
+ char mSlot;
};
#endif