summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-05-20Buffer layered sprites under SDLJared Adams1-2/+8
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-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-14Use setTarget a bit earlierThorbjørn Lindeijer1-3/+1
2010-02-14Removed a redundant SDL_Surface pointerTametomo1-16/+15
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 )
2010-01-26Fixed crash when failing to switch to fullscreen/windowedThorbjørn Lindeijer1-7/+14
The setup page tries to restore the previous video mode by calling setFullscreen again after it has failed. However, the setFullscreen function assumed a valid mode was set (it referenced mScreen). This would then crash. Worked around by remembering the parameters passed to setVideoMode, and using those in setFullscreen. Besides fixing a potential crash, this also fixes switching between fullscreen and windowed on Maemo 5. Probably trying to keep the color depth the same was what made it fail (which is not necessary anyway).
2009-08-13Changed mImage member to mSDLSurface as it is SDL specific...Bertram1-16/+20
2009-07-27Added the ability to ask a ambient layer to keep its ratio when the ↵Bertram1-0/+42
resolution isn't the default. You'll have to add this in map properties, for instance if you're want to keep ratio on overlay 0: <map version="1.0" orientation="orthogonal" width="128" height="128" tilewidth="32" tileheight="32"> <properties> ... <property name="overlay0keepratio" value="true"/> ... </properties> </map>
2009-07-24Made the wallpaper be rescaled when necessary under SDL and OpenGL.Bertram1-2/+39
The SDL methods to rescale the wallpaper has been optimized to permit rescaling at load time while OpenGL draws directly rescaled. Does someone know how to smooth the rescaled image under OpenGL?
2009-04-14Put the remaining unnamespaced handlers in a namespaceBjørn Lindeijer1-2/+2
Also fixed some initialization order warnings when compiling with tmwserv support and made two getters const.
2009-03-25A host of code style fixesBjørn Lindeijer1-1/+1
Mostly putting & and * in the right place and making some getters const.
2009-03-23Merge branch 'aethyra/master'Bjørn Lindeijer1-27/+33
Conflicts: Many files.
2009-03-16Applied a similar optimization as in commitIra Rice1-12/+22
d654758ef63f6515d678ceaf77d63a2693e08fb7, but for SDL instead. This currently doesn't buy too much, but it's a little better than it used to be. TODO: Find out why SDL is bottlenecked, and try to bring its performance up to OpenGL levels, if possible. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Extended window layout to take relative positions, as well as offsets toIra Rice1-17/+13
that position. This makes it so that when resolutions are changed, the default locations stay relative to the window's position, and not the 800x600 screen resolution. Signed-off-by: Ira Rice <irarice@gmail.com>
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-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-10/+8
the function names should no longer be around. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-29Fixed a video resolution switching crash.Ira Rice1-1/+0
Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-26Fixed a potential leak in setup, changed the default border color toIra Rice1-1/+2
white for wallpapers (matches our wallpapers better), and fixed the effect manager. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-20Enabled video mode switching, as well as got rid of an old, unneededIra Rice1-0/+2
check in the ColorDB. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-2/+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-10-18Merged removal of dependency on Guichan OpenGL from trunk to 0.0 branch, Bjørn Lindeijer1-2/+13
including optimization of OpenGL memory usage on modern OpenGL drivers. Patches by Guillaume Melquiond.
2007-06-03Fixed image loading in software mode to not check for alpha layer with imagesBjørn Lindeijer1-13/+0
aren't 32-bit and removed drawImageTransparent from Graphics class, should be set on image.
2007-05-04Merged particle engine into main eAthena branch.Philipp Sehmisch1-0/+11
2006-12-12Merged r2829 from trunk (Merged the definition of ImageRect into graphics.h)Bjørn Lindeijer1-2/+0
2006-11-26Higher precision log timestamps, some more logging and support for TGA images.Bjørn Lindeijer1-0/+3
2006-07-19Merged new_animation branch until r2415 into trunk. Eugenio Favalli1-2/+4
2006-05-03Increased fps limit granularity and cleaned some code, fixed some xml ↵Eugenio Favalli1-11/+0
library name in Dev-C++ project file, switched version to 0.0.20.
2006-03-09Made all class members named like mClassMember.Björn Steinbrink1-3/+3
2005-10-09* Made Sprite into an interface implemented by both FloorItem and Being, whichBjørn Lindeijer1-16/+12
hook themselves into the map on construction. The improved fringe layer is working as expected now. * Made sure TMW compiles without warnings even when using "-Wconversion -Wshadow -Wcast-qual -Wwrite-strings -ansi -pedantic", lots of cleanups. * Added two new small tilesets that contain the desert tiles that are twice and three times the height of a normal tile. One well in new_3-1 has been converted to use the new double tiles for testing purposes.
2005-09-19Mostly code cleanups related to commits in past two days.Bjørn Lindeijer1-6/+0
* Replaced custom function FIND_PATH with AC_PATH_PROG, used for finding sdl-config. * Removed -lphysfs from Makefile.am which should be added automatically already. * Actually show the overweight message, and only show it once for each time weight goes above half the max weight. * Surfaces passed to SDL_BlitSurface shouldn't be locked according to the manual. * Minimal fps limit is now 10 fps. * Reverted change by Bertram that hardcoded the updatehost value.
2005-09-18Move the writing logic out of the Graphics class once again... Some cleanups ↵Björn Steinbrink1-44/+1
in the screenshot filename selection code.
2005-09-18Some minor optimizations.Yohann Ferreira1-7/+5
2005-09-18Removed unuseful comments. Made the saveScreenshots() function return a ↵Yohann Ferreira1-88/+5
correct value.
2005-09-18Made the saveScreenShot makes its screenshots under user home dir in *nices, ↵Yohann Ferreira1-1/+129
made it more C++ way to avoid a leak, and made it check for existence of a file with same name before writing; In that case the screenshot's number is incremented until it finds an adequate name.
2005-09-18Changed Graphics::saveScreenshot to Graphics::getScreenshot. Now using the ↵Björn Steinbrink1-89/+15
ImageWriter to save that screenshot.
2005-09-17configure.ac: Fix typo.Björn Steinbrink1-2/+3
src/Makefile.am: Remove useless (duplicate) -lpng. src/graphics.cpp: Add missing cstdarg header. src/net/messagein.cpp: Fix some funny looking preprocessor statement. src/net/messageout.cpp: Readd SDLnet header, for changed preprocessor stuff.
2005-09-172005-09-17 Duane Bailey <nayryeliab@gmail.com>Duane Bailey1-0/+100
* src/net/messagin.cpp, src/net/messageout.cpp, src/net/network.cpp: removed replaced MACOSX defines with big endian defines * src/graphics.cpp, src/graphics.h: added screenshot method * src/game.cpp: added code, so that when one presses 'alt-p' (for picture), it takes a screenshot and saves it to a png * src/Makefile.am, config.ac: added png library stuff
2005-08-25Use OpenGL's translation capabilites. Small cleanups.Björn Steinbrink1-19/+18
2005-08-25Made our drawImage() method respect the clip area from the guichan graphics ↵Björn Steinbrink1-0/+3
part. Removed some (now) obsolete code. Fixed compilation errors.
2005-08-18Semi-separated OpenGL and SDL graphics classes, improving OpenGL performance.Björn Steinbrink1-167/+18
2005-08-15Made the OpenGL related code fully #ifdef'ed.Björn Steinbrink1-21/+28
2005-08-14Started to fade out the useOpenGL global variable.Björn Steinbrink1-3/+2
2005-08-14Moved image drawing code into the graphics class.Björn Steinbrink1-3/+60
2005-08-14Make the wrapper functions in the Graphics class conditional on OpenGL support.Björn Steinbrink1-97/+77
2005-08-13Huge header cleanup to reduce dependencies and compile time.Björn Steinbrink1-2/+8
2005-08-10Moved knowledge about whether we use OpenGL into the Graphics class. Added ↵Björn Steinbrink1-0/+36
helper function for being creation to reduce code duplication. Some code simplifications.
2005-08-02Moved graphics setup code into the graphics class.Björn Steinbrink1-28/+101