summaryrefslogtreecommitdiff
path: root/src/resources/resource.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-02-09Fixed wallpaper prescaling issuesThorbjørn Lindeijer1-12/+13
Image::SDLgetScaledImage was changed so that it tries to find an existing scaled version of the image first, and generates it when none exists. When it needs to generate one, this resource is added to the resource manager, partly to avoid duplicating the work later but mainly to keep memory management straightforward. This function also used to leak the scaled SDL_Surface since it wrongly assumed that Image::load would free it. To avoid filling up the memory with scaled wallpapers that are waiting 30 seconds until they will be deleted, the Resource::decRef function was extended with a parameter that allows telling it what to do with orphans. Calling decRef with Resource::DeleteImmediately will delete the resource immediately in case the resource is orphaned. Reviewed-by: Yohann Ferreira
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-06-02Arbitrary code cleanupsThorbjørn Lindeijer1-2/+2
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
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-14Don't quit the client on invalid decRefThorbjørn Lindeijer1-3/+5
It's not a fatal error.
2010-02-14Give more meaningful error messages when decRef() fails.Tametomo1-2/+5
Signed-off-by: Tametomo <irarice@gmail.com>
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-03-27Fixed include structure in resource/ directoryBjørn Lindeijer1-3/+4
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-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-15Style cleanups throughout most of the code. Splitting function type fromIra Rice1-4/+2
the function names should no longer be around. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-3/+0
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-07-18Import of client treeLloyd Bryant1-1/+1
2007-12-22Merged revisions 3740 via svnmerge from Bjørn Lindeijer1-6/+6
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r3740 | gmelquio | 2007-11-16 12:06:46 +0100 (vr, 16 nov 2007) | 1 line Delayed resource deletion by 30 seconds. ........
2007-11-20Merged revisions 3642,3662-3664,3667 via svnmerge from Bjørn Lindeijer1-6/+0
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r3642 | gmelquio | 2007-10-19 19:46:46 +0200 (Fri, 19 Oct 2007) | 1 line Factored code between resource handlers. Implemented failure-friendly sprite loader. ........ r3662 | gmelquio | 2007-10-21 21:01:16 +0200 (Sun, 21 Oct 2007) | 1 line Added persistent positioning. ........ r3663 | gmelquio | 2007-10-21 21:03:43 +0200 (Sun, 21 Oct 2007) | 1 line Fixed missing pixels at bottom and right. ........ r3664 | gmelquio | 2007-10-21 21:05:56 +0200 (Sun, 21 Oct 2007) | 1 line Changed to use default values when restoring missing settings. ........ r3667 | gmelquio | 2007-10-21 22:09:08 +0200 (Sun, 21 Oct 2007) | 1 line Fixed invisible text in dropboxes and shopboxes. ........
2006-01-31Made ResourceManager a friend of Resource to avoid looping over decRef, ↵Björn Steinbrink1-5/+1
which returns void now.
2005-08-29Clean up of the ConfigListener and Resource interfaces.Björn Steinbrink1-8/+2
2005-08-13Huge header cleanup to reduce dependencies and compile time.Björn Steinbrink1-1/+3
2005-06-24Adding missing #include. (Thanks to Scandium).Yohann Ferreira1-0/+2
2005-06-23Finishing resource manager ability to clean up resources. Still work to do onBjørn Lindeijer1-25/+21
resources other than images.
2005-05-21Numerous things:Bjørn Lindeijer1-0/+5
* Fixed two non-virtual destructor warnings showing up with GCC 4. * Fixed OpenGL inventory text drawing that broke in last commit * Removed glClear cause screen is redrawn completely anyway * Fixed updating of buttons in inventory window * Made items.xml be loaded through resource manager.
2005-05-17Temporarily fixing problem with resource cleanup.Bjørn Lindeijer1-6/+14
2005-05-16This little workaround necessary to prevent crashes for now.Bjørn Lindeijer1-2/+2
2005-01-13Added heavily modified resource manager by zenogais that is currently usingBjørn Lindeijer1-0/+57
Allegro to load/draw images. Only the login wallpaper is currently loaded using the resource manager and the resource manager still waits with searching for available files until they are asked for instead of indexing what is available.