summaryrefslogtreecommitdiff
path: root/src/resources/wallpaper.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-03-12General code cleanupsThorbjørn Lindeijer1-12/+3
* Use default member initializers * Use range-based for loops * Avoid needless pointer references for ShopItem::mDuplicates * Removed type aliases that are only used once or twice * Removed more unused includes * Removed some unused functions * Removed superfluous .c_str() * Rely on default copy and assignment operators for Vector class * Use std::unique_ptr in some places * Removed duplicated mPlayerMoney updating in SellDialog * Removed duplicated Game::handleInput call * Removed unused SDLInput::mMouseInWindow * Removed remnant of manual widget positioning in HelpWindow * Removed superfluous initialization of static pointers
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-1/+1
modernize-loop-convert modernize-deprecated-headers
2012-02-12Improved the wallpaper choosing algorithmThorbjørn Lindeijer1-24/+22
Now it searches for the smallest wallpaper that is at least as large as the screen, since downscaling is preferred to upscaling. When not found, it will go with the largest available wallpaper. Previously, the algorithm preferred upscaling, but didn't bother searching for the largest available one, but would pick a random image. It would also revert to the default Mana wallpaper when no image was small enough to fit on the screen. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira
2012-02-06Some cleanups in the initialization of wallpaper pathsThorbjørn Lindeijer1-26/+31
The 'paths' configuration in client-data now overrides any configuration in 'branding', so that it will apply after the updates for a certain server have been downloaded. Also, some isDirectory checks have been removed. When the configuration is wrong, it's probably better to see that there is a problem. Reviewed-by: Yohann Ferreira
2012-02-06Fixed searching for wallpapers on 64-bit machinesThorbjørn Lindeijer1-4/+2
The check whether a filename contains any '%' character was failing because the 'unsigned int separator' was too small to hold std::string::npos. Reviewed-by: Yohann Ferreira
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-01-27Fix the wallpapers loading broken logic.Yohann Ferreira1-6/+10
Trivial.
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-12/+6
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-07-11Made the different hard-coded paths and files be now taken from theYohann Ferreira1-7/+39
data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127.
2010-03-08Fix crash with incorrect wallpaper names. (From 4144)Bertram1-11/+16
Reviewed-by: Bertram
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-4/+3
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-3/+3
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2009-10-03Added support for the "too fast" login errorThorbjørn Lindeijer1-4/+2
So that next time somebody encounters it, it doesn't turn up as "unknown error".
2009-10-02Updating Code::Blocks project and adding header to fix compiler error.Stefan Dombrowski1-0/+1
2009-08-11Added the possibility to get random login wallpapers, when several fit the ↵Bertram1-34/+57
resolution. This resolve the Mantis #809. The images filenames must end using the mask "_<width>x<height>.png" For instance: myskylogin_800x600.png. Of course, the images must be in the data/graphics/images folder.
2009-05-03Moved strprintf into stringutils.{h,cpp}Bjørn Lindeijer1-1/+1
2009-04-10Introduced a Desktop widget to handle the wallpaperBjørn Lindeijer1-7/+7
Cleans up main.cpp a little.
2009-04-10Some tweaks to wallpaper loading codeBjørn Lindeijer1-26/+30
Mainly to conform better with coding conventions.
2009-04-09Fixed some warningsBjørn Lindeijer1-4/+13
Unused variable, compiler suggested braces to disambiguate an else statement and another comparision between signed and unsigned integers.
2009-04-08Add a more flexible wallpaper systemJared Adams1-0/+99