summaryrefslogtreecommitdiff
path: root/src/particle.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-03-06General code cleanupsThorbjørn Lindeijer1-5/+1
* Use final for all message handlers, Client, LocalPlayer, Being::getType, Being::setPosition and Being::setMap. (avoids some warnings about virtual dispatch in constructors) * Use auto in more places * Use emplace_back instead of push_back in some places * Use default member initializers * Less else after return * Removed superfluous .c_str() * Removed type aliases that are only used once * Removed more unused includes
2024-02-13General code cleanupsThorbjørn Lindeijer1-4/+0
* Removing unused includes * Use member initialization * Use range-based for loops * Use nullptr * Removed no longer used aliases * Use override * Don't use else after return * Use '= delete' to remove implicit members * Use std::string::empty instead of comparing to ""
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-15/+11
modernize-loop-convert modernize-deprecated-headers
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-9/+9
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-02-13Fixed drawing order of particlesThorbjørn Lindeijer1-5/+0
This getDrawOrder hack is no longer necessary. It basically moved to the ActorSprite, in the other direction. Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-09-02The draw order of particles is now Y - 16 pixels.unknown1-0/+5
This means that the order point of the sprites relative to the particles is no longer the lowest point of the image but instead a point which is approximately between the feet of the characters. The intent of the latest commits to treat sprites as perpendicular to the ground instead of perpendicular to the view line is retained by this approach. I tested this with various particle effects and it results in exactly the expected behavior. Note that this does NOT fix the current problems on TMW with the snail slime effect, because the TMW content team accidently placed this one 10px in the air. Sorry, garbage in, garbage out. getDrawPixelY was re-renamed to getPixelY to be consistent with getPixelX, while getPixelY was renamed to getDrawOrder, to make its purpose clear. Further, particles are no longer drawn when behind other objects. This is implemented by adding a drawnWhenBehind member function to Actor, which currently returns true for everything except particles and compound- sprites with more than one sub-sprites (the later case is consistent with the previous behavior of them). An exception are text particles which are excempt from this exception and whose drawing order is also biased by 16 pixels south instead of north to make them more visible. Plus some minor changes from Bertram. Reviewed-by: Bertram. Resolves: Mana-Mantis #362.
2011-06-22Made possible to separate the dye colors and channelsYohann Ferreira1-6/+14
for particle effects. It is now possible to write, for instance: <particlefx>my-particle-file.xml|#cbcb78,345678</particlefx> and in my-particle-file.xml: ... <property image="my-image.png|W" /> ... This will permit the use (and reuse) of generic particle files.
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-1/+15
Conflicts: src/being.cpp src/client.cpp src/commandhandler.cpp src/gui/setup_video.cpp src/gui/socialwindow.cpp src/gui/viewport.cpp src/gui/widgets/browserbox.cpp src/gui/widgets/itemcontainer.cpp src/imageparticle.cpp src/localplayer.cpp src/localplayer.h src/map.cpp src/net/tmwa/beinghandler.cpp src/particle.cpp src/particle.h src/player.cpp src/player.h
2010-10-17Added death effects to particle engine.Philipp Sehmisch1-16/+58
Every particle can now have a death effect. This is an effect which is created when the particle dies. Which death reasons (timeout, touching floor, touching sky, reaching target or deleted by external call) trigger the effect can also be specified. This is useful for exploding projectiles and many other effects. Reviewed-by: Bertram
2010-10-17Fixed wrong alpha calculation of text particlesPhilipp Sehmisch1-0/+13
This resolves: http://bugs.manasource.org/view.php?id=51 Reviewed-by: Bertram
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-4/+4
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-05-06Add support for floor item spritesJared Adams1-1/+3
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-04-23Add an Actor class to replace the Sprite classJared Adams1-14/+1
The Actor class manages the Map reference, position vector, and alpha float. These are the common parts from it's children.
2010-03-07Added a property to particle files which says if they may be resized based ↵Philipp Sehmisch1-3/+9
on the dimensions in the map file or not. Reviewed-by: Jared Adams
2010-03-04Implemented markers for warp portals defined in map files in form of ↵Philipp Sehmisch1-0/+9
particle effects. Reviewed-by: Jared Adams <jaxad0127@gmail.com>
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-10Adds missile-particle attribute to items and monster attacksChuck Miller1-0/+7
To use simply add something like: missile-particle="graphics/particles/arrow.particle.xml" to the item's or monster's xml entry This will only work on equipped weapons, and on specified monster attacks. This patch also fixes a memory leak with target particles
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 )
2010-01-12Standardize header orderJared Adams1-2/+5
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2009-12-16Stored the cached config value which says if non-crucial particle effects ↵Philipp Sehmisch1-0/+2
are enabled or not in a static member of class Particle instead of an instanced member of Being.
2009-05-03Added rotational particles, and added code to show arrows when a player ↵Chuck Miller1-1/+6
shoots them.
2009-04-14Start a MathUtils fileJared Adams1-1/+1
It has fast(inv)sqrt and weightedAverage. Also cleanup the last ocmmit a bit.
2009-03-23Merge branch 'aethyra/master'Bjørn Lindeijer1-20/+24
Conflicts: Many files.
2009-03-17Added an image merge feature loosely based on a merge function found inIra Rice1-20/+24
the open source project Wormux. To improve SDL performance, the number of layers that are pushed out to the hardware or software buffers should be reduced, which is where this function comes into play, as it combines two surfaces together so that the number of blit operations is reduced. This function is currently not used, but will be used once a good way to link each of the target systems is determined so that it only initiates when SDL is enabled, as well as making sure that each hook that uses this function is benefiting from it sufficiently. At the moment, it's suspected that the particle engine will likely be the most likely to benefit from this function, followed by tile drawing, then sprite drawing. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-12Make use of the new available colorsMajin Sniper1-12/+5
This patch lets all being derivatives use the palette to set their name's colors. Text Particle Effects all respect the new settings. Some widgets were updated to use the colors.
2009-03-12Make use of the new available colorsMajin Sniper1-12/+5
This patch lets all being derivatives use the palette to set their name's colors. Text Particle Effects all respect the new settings. Some widgets were updated to use the colors.
2009-02-20Added a pickup notification as particle effect. Also make a ui option to ↵Majin Sniper1-4/+7
enable/disable this effect (default is off) and another option to disable the pickup notification in the chat log (default is on).
2009-02-19Added a pickup notification as particle effect. Also make a ui option to ↵Majin Sniper1-4/+7
enable/disable this effect (default is off) and another option to disable the pickup notification in the chat log (default is on).
2009-02-10Fixed header files, as well as removed the unused buddy list class (notIra Rice1-2/+3
useful since buddy lists are tracked through the player relation interface instead) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-09Merged with Aethyra master as of 2009-02-09Bjørn Lindeijer1-0/+2
Conflicts: A lot of files...
2009-02-09Merged with Aethyra master as of 2009-01-27Bjørn Lindeijer1-4/+3
Conflicts: Almost everywhere.
2009-02-07Some more include cleanups.Ira Rice1-0/+2
Signed-off-by: Ira Rice <irarice@gmail.com>
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.
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-12-14Passing vectors by referencePhilipp Sehmisch1-23/+22
2008-12-14Some systactical sugar for 864e33Philipp Sehmisch1-13/+6
2008-12-14Fixed follow-parent of nested and being-following particle emittersPhilipp Sehmisch1-11/+36
2008-12-14Passing vectors by referencePhilipp Sehmisch1-22/+22
2008-12-14Some systactical sugar for 864e33Philipp Sehmisch1-13/+6
2008-12-14Fixed follow-parent of nested and being-following particle emittersPhilipp Sehmisch1-1/+0
2008-12-14Fixed follow-parent of nested and being-following particle emittersPhilipp Sehmisch1-11/+36
2008-12-08Code reformattingBjørn Lindeijer1-36/+30
I wish I had never fallen for this weird style, and I hope removing it will prevent others from introducing new code like this. :-)
2008-12-08Code reformattingBjørn Lindeijer1-40/+32
I wish I had never fallen for this weird style, and I hope removing it will prevent others from introducing new code like this. :-)
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-4/+1
statements, as well as removing the new skill dialog, which we do not, nor will we use (if we do, it'd be a new one that we'd make). WARNING!!! This, and all other previous builds have a linker error for the Gnome libraries version 4.3.2 on my setup. It's assumed that this is also the case for other users of this library as well. I'm currently assuming that there's a bug in the compiler itself, and will look into reporting this, but in the mean time, it doesn't build for these users, unfortunately. Sorry about this.
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-10-27Made targets draw on the fringe layer, as well as added t for talking to Ira Rice1-4/+2
an NPC, n for targeting an NPC, and changed basic targeting code so that it'll time out after being on a target for longer than a minute.
2008-10-26Added Crush's recent Particle engine modifications from TMW.Ira Rice1-1/+1
2008-10-26Implemented particle emitters with properties which change over time ↵Philipp Sehmisch1-1/+1
according to wave functions.