summaryrefslogtreecommitdiff
path: root/src/imagesprite.h
AgeCommit message (Collapse)AuthorFilesLines
2024-02-22General code cleanupsThorbjørn Lindeijer1-5/+2
* 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-10/+10
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-01-29Removed Sprite::getCurrentFrame and Sprite::getFrameCountThorbjørn Lindeijer1-6/+0
They are apparently no longer being used. Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-06-23Made the being death sequence better handled.Yohann Ferreira1-0/+3
Now the death animation is set to the minimum of 1.5 seconds just as in the older versions, but permit longer sequences as well. I didn't put a maximum hard cap on it as it may be a burden for the maintainers whatever the hard cap would be, and as it isn't vital to set one anyway. Resolves: Mana-Mantis #364. Reviewed-by: bjorn, Jaxad0127.
2010-07-29Changed the items loading to handle a new 'attack-action' parameter.Yohann Ferreira1-1/+1
The old behaviour was to load the weapon-type value and do many unnecessary checks and transformation on it: The weapon-type was transformed using hard-coded values into an integer enum value. The exact same thing was done on the opposite side in the animation files before comparing the two. As both data were string values, I simplified all of it by using the value taken in items.xml to call the corresponding action. This now also permit to set up new attack animation in items.xml and in the playerset.xml without having the need to modify the client code. Last but not least, the weapon-type value was used by both the skills and the actions and avoided the possibility to set up a definite action for a weapon-type. Note: The weapon-type parameter will become deprecated for the server in favor of a 'skill' parameter to reflect more it's actual use. This patch is the first step to fix Manasource issue: #157.
2010-06-09Remove hard-coded frame counts from Being classJared Adams1-7/+13
Also removes the Monster/Player difference in tmwAthena's Being::logic and moves the particle code from Being::setAttack to Being::Logic for tmwAthena. Reviewed-by: Chuck Miller
2010-05-20Buffer layered sprites under SDLJared Adams1-5/+9
This improves framerate and allows transparent overlay for complex sprites. Two copies of the buffer are kept, one at full opacity, one with variable opactiy, to reduce calls to setAlpha. Reviewed-by: Bertram
2010-05-06Add support for floor item spritesJared Adams1-0/+63
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