summaryrefslogtreecommitdiff
path: root/src/item.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-09-28Removed getter/setter cruft from ItemInfoThorbjørn Lindeijer1-2/+2
Made the class and the code in general more readable by removing all the needless getters and setters.
2024-04-08Use ResourceRef<Image> in more placesThorbjørn Lindeijer1-20/+6
Automatic reference counting of images is now used by Item, Icon, AnimatedSprite, ImageSprite, ParticleEmitter, Minimap, Desktop and Emote. Since ResourceManager::get automatically adds a reference, it needs to be explicitly subtracted when the resource is managed by ResourceRef. This is taken care of by the new ResourceManager::getImageRef. Also removed the apprently unused and duplicate "mDrawImage" from Item (which also didn't get decRef called on it). Fixes cleanup of emote ImageSet and ImageSprite instances, as well as particle images.
2024-02-22General code cleanupsThorbjørn Lindeijer1-3/+1
* Use default member initializers * Use range-based loops * Don't use 'else' after 'return' * Removed some unused includes * Construct empty strings with std::string() instead of "" * Clear strings with .clear() instead of assigning "" * Check whether strings are empty with .empty() instead of comparing to "" * Removed redundant initializations
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-2/+2
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-04-09Removed the Mana namespaceThorbjørn Lindeijer1-6/+6
It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams
2011-04-09Moved Channels to Mana::Event::ChannelThorbjørn Lindeijer1-2/+2
Acked-by: Jared Adams
2011-04-09Moved Events to Mana::Event::TypeThorbjørn Lindeijer1-2/+2
Acked-by: Jared Adams
2010-11-11Replace Event names with enums instead of stringsChuck Miller1-2/+2
2010-11-11Have the event system channels use enums instead of stringsChuck Miller1-2/+2
Reviewed-by: Freeyorp
2010-08-26Merged testing branch into master.Yohann Ferreira1-5/+7
2010-08-16Move more to the event systemJared Adams1-0/+16
Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram
2010-08-03Move Theme and UserPalette to the resources folderJared Adams1-2/+2
Reviewed-by: Yohann Ferreira
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-1/+1
Please note that I didn't turned all the getValue() call into new ones, simply because I have to have config object initiated which is not forcefully the case the branding file. Resolves: Manasource Mantis #170.
2010-07-19Merge branch '1.0'Yohann Ferreira1-3/+8
Conflicts: src/gui/itempopup.cpp src/item.cpp src/monster.cpp src/net/manaserv/playerhandler.cpp src/net/tmwa/partyhandler.cpp src/npc.cpp src/player.cpp src/resources/itemdb.cpp src/resources/monsterdb.cpp src/resources/monsterinfo.cpp src/resources/npcdb.cpp src/resources/spritedef.cpp
2010-07-11Made the different hard-coded paths and files be now taken from theYohann Ferreira1-3/+8
data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127.
2010-05-06Add support for floor item spritesJared Adams1-1/+2
This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite; CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common functionailty into new base classes which will make other Mantis tickets easier to do. Also allows monsters to use particle effects. Reviewed-by: Bertram
2010-03-05Rename SkinLoader to ThemeJared Adams1-3/+3
Also merge the guialpha ConfigListener into Theme. Reviewed-by: Thorbjørn Lindeijer
2010-02-28Make the gui more themeable and distribute two themesJared Adams1-2/+4
The older gray theme and the new wood theme are available as themes. The gray theme needs some new graphics for hilights. Add a theme option for branding and add path/to/branding/data to the PhysFS search path. Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Chuck Miller
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2009-10-15Make sure item icons in the invy are full opacityJared Adams1-0/+8
2009-09-14Fix context menu for items in the EquipmentWindowJared Adams1-1/+1
2009-07-21Merge equipment handling and fix some bugsJared Adams1-2/+0
2009-04-05Remove some more #ifdefsJared Adams1-9/+2
2009-03-27Fixed include structure in resource/ directoryBjørn Lindeijer1-0/+1
There is also a new rule that trivial constructors and destructors should no longer be trivially "documented", since this just takes up space with no gain.
2009-03-22Merged the tmwserv client with the eAthena clientBjørn Lindeijer1-3/+14
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-06-12Merged revisions 3738 via svnmerge from Bjørn Lindeijer1-0/+35
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r3738 | b_lindeijer | 2007-11-16 00:44:01 +0100 (Fri, 16 Nov 2007) | 3 lines Moved item icon from ItemInfo class to the Item class, so that it can be loaded on demand. Results in faster startup time and reduced memory usage. ........
2007-11-15Moved item icon from ItemInfo class to the Item class, so that it can be loadedBjørn Lindeijer1-0/+22
on demand. Results in faster startup time and reduced memory usage.
2007-10-01Fixed inventory display with respect to empty slots.Guillaume Melquiond1-4/+3
2007-08-01Fixed update of equipment flag, so that items can be equipped properly.Guillaume Melquiond1-0/+6
2007-07-31Removed legacy inventory code. Added display of equipment.Guillaume Melquiond1-0/+10
2005-10-07Modified finding NPC as by timonator's suggestion in order to allow NPCs to beBjørn Lindeijer1-16/+0
clicked on their heads too. Also made start to tile engine improvement by adding the Sprite class that is now used by the floor items for being displayed on the map. Finally added documentation to Item class and splitted out Properties class from Map.
2005-07-17Added Item and Equipment class and made the appropriate places make use of ↵Björn Steinbrink1-0/+39
them. Plus some cleanups.