summaryrefslogtreecommitdiff
path: root/src/units.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-07-04Added logging priorities and use SDLs logging facilitiesThorbjørn Lindeijer1-3/+3
By using SDL logging, we can rely on SDL to filter the log messages by their priority before they get sent to our custom output function. For example, we now no longer get entries for created and destroyed Window instances by default, since these have only "debug" priority whereas the default priority for the "app" category is "info". We can also get log messages raised by SDL itself in our log now. Log levels can be controlled per category through the "SDL_LOGGING" environment variable. Many existing log messages have been assigned a category based on their existing prefix.
2025-02-26Plugged various memory leaksThorbjørn Lindeijer1-2/+1
* ActorSpriteManager failed to delete its AutoCompleteLister instances. * CharCreateDialog was relying on ~Window to delete its child widgets, but it wasn't always adding all its widgets, so some failed to get deleted. Now it only creates the widgets it needs. * SkillDialog didn't delete its SkillModels. * PlayerList didn't delete its player Avatar instances. * Fixed deletion of the EffectManager. Leaks located using AddressSanitizer.
2025-01-20Wrapped xmlNodePtr access with a Node classThorbjørn Lindeijer1-11/+11
Slightly more ergonomic and this eliminates direct libxml2 usage from many places.
2024-09-27Replaced for_each_xml_child_node macro with helper classThorbjørn Lindeijer1-1/+1
The new XML::Children class enables using a C++11 range-based for loop to iterate over the children of an xmlNodePtr.
2024-02-22General code cleanupsThorbjørn Lindeijer1-61/+53
* 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
2013-05-04Client-side settings are now available from settings.xmlPrzemysław Grzywacz1-56/+51
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2010-02-21Do some more copyright header cleanupsJared Adams1-1/+1
Fix "(C) 2009-2009" to just "(C) 2009" Fix "(C) 2010 TMW" to "(C) 2010 Mana" Remove TMW compyright on (hopefully all) files added after 0.0.29.1
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-3/+2
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-28Added virtual destructors, some implicit casts, and a couple of type changes.Daniel Bradshaw1-1/+1
Many warnings removed. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2010-01-10Change code styleAndrei Karas1-4/+9
2009-05-03Moved strprintf into stringutils.{h,cpp}Bjørn Lindeijer1-1/+0
2009-03-26Remove redundancy, fix variable names and other code cleanupsBjørn Lindeijer1-15/+17
2009-03-12Fix a bug in the units systemJared Adams1-2/+2
2009-02-18Introduced a toLower method and grouped string utilsBjørn Lindeijer1-2/+1
The string utility methods are now grouped together in the stringutils.h header. Also, a toLower method was added for convenience.
2009-02-17Got rid of const where it does not make much senseBjørn Lindeijer1-3/+3
It's not that useful to make variables that are passed by value const. In the declaration it is even completely ignored.
2009-02-15Fixed compiler warningsBjørn Lindeijer1-2/+2
Comparison between signed and unsigned integer expressions.
2009-02-15Add configurable units systemJared Adams1-0/+233