summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
AgeCommit message (Collapse)AuthorFilesLines
2011-06-23Made the being death sequence better handled.Yohann Ferreira1-0/+11
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.
2011-06-02Arbitrary code cleanupsThorbjørn Lindeijer1-5/+4
Just some stuff that piles up while "looking" at the code, which eventually gets annoying to ignore while staging real changes. * Replaced a few NULL occurrences with 0 * Rely on default parameter for std::vector::resize. * Replaced a few "" with std::string() * Prefer .empty() to == "" * Removed a few comparisons with NULL * Don't check pointers before deleting them * Removed a bunch of redundant semicolons * Made some global variables static (local to their compilation unit) * Prefer prefix ++/-- operators to postfix versions when possible * Corrected location of a comment
2011-05-30Remove some uneeded offsettingJared Adams1-25/+8
Also fix position of being names. Reviewed-by: Bertram
2011-05-18Fix sprite cachingJared Adams1-29/+21
2011-05-18Fix detection of ActorSprites under OpenGLJared Adams1-0/+3
2011-05-17Fix sprite buffering size issuesJared Adams1-75/+101
Reviewed-by: Yohann Ferreira
2011-04-11Disable sprite caching for nowJared Adams1-0/+5
Reviewed-by: Thorbjørn Lindeijer
2010-12-06Removed superfluous #includes taken from checkheaders list.Yohann Ferreira1-3/+0
Resolves: Mana-Mantis #265. Trivial fix.
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-0/+50
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-21Fix transparent overlays under OpenGLJared Adams1-0/+4
This was accidentally broken in the SDL buffer commit. Reviewed-by: Thorbjørn Lindeijer
2010-05-21Fix some memory leaks in SDL layerd sprite bufferingJared Adams1-0/+9
2010-05-20Buffer layered sprites under SDLJared Adams1-19/+202
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/+121
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