From 8bde9095c5840b8d62ebafe11beaed98877d6ac2 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 9 Oct 2005 03:34:45 +0000 Subject: * 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. --- src/resources/iteminfo.h | 96 +++++++++++++++++++++++++++++++----------------- 1 file changed, 62 insertions(+), 34 deletions(-) (limited to 'src/resources/iteminfo.h') 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 -- cgit v1.2.3-70-g09d2