summaryrefslogtreecommitdiff
path: root/src/defaults.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-10-26Fixed FPS limit being enabled by defaultThorbjørn Lindeijer1-3/+3
There were some inconsistencies between the values set up in `Client::initConfiguration` and those in `getConfigDefaults`. These duplicates have now been removed. For some of these settings the code getting the values had to be adjusted to use getBoolValue, to actually rely on the provided default instead of one provided as a parameter.
2024-03-22Added support for scaling the outputThorbjørn Lindeijer1-0/+1
* Added "Scale" user option, which can either by "Auto" or an explicit scaling factor. Its maximum value depends on the current resolution. The "Auto" factor is based on keeping the logical resolution on at least 800x600, wheres the maximum scale is based on keeping the logical resolution on at least 640x480. * Enabled support for High DPI. This means the rendering target can now have a different resolution than the window size, which can happen on macOS, Windows and Wayland. The resulting scale is multiplied by the above user-controlled scale. Currently, this looks ugly for non-integer scales, which are not used on macOS and can only be configured on some Wayland compositors. Has not been tested on Windows. * Simplified OpenGL initialization (moved out of _beginDraw). * Made sure _beginDraw/_endDraw sets a clip area also for SDLGraphics.
2024-03-02General code cleanupsThorbjørn Lindeijer1-14/+12
* Don't needlessly store or return raw pointers in BeingInfo * Less copying, more moving * Less else after return * Make AddDEF a template instead of a macro * Removed some unused includes * Use range-based for loops
2024-02-27Added VSync and windowed fullscreen optionsThorbjørn Lindeijer1-2/+3
The configuration and setup UI were adjusted to the new options. This also fixes issues in applying new video settings. Default resolution was changed from 800x600 to 1280x720. VSync is enabled by default while FPS limit was disabled. Display aspect ratio for the resolution options. I had to work around some macOS issues: * Don't change window size when it appears to be "maximized", since it just changes the rendering area while leaving the window maximized. * Unset fullscreen display mode temporarily to allow changing resolutions, otherwise the rendering area no longer matches the screen and mouse input is also off. * Removed SDL_WINDOW_ALLOW_HIGHDPI for now because it causes issues on macOS, since we're not actually handling the scaling factor. A Video class and an SDLGraphics subclass were split off from Graphics. This setup has Less duplication and leaves the OpenGLGraphics and SDLGraphics better separated. Fixes #57 Fixes #58
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-1/+1
modernize-loop-convert modernize-deprecated-headers
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-3/+3
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2024-01-26Disable "opengl" by default and remove unused "hwaccel" optionThorbjørn Lindeijer1-2/+1
Since we now use SDL2, OpenGL is used through the SDL2 API. This appears to work very well and handles resizing better (with less flicker). Our manual OpenGL rendering code is probably obsolete. The "hwaccel" option referred to hardware accelerations supported by SDL1 and is no longer relevant.
2012-08-05Enable OpenGL by default on all platformsThorbjørn Lindeijer1-1/+1
Before it was only enabled by default for Mac. Reviewed-by: Erik Schilling
2012-05-21Merge branch '0.6'Erik Schilling1-2/+2
2012-05-21Made pickup notifications to appear as particle instead of text by default0.6Erik Schilling1-2/+2
Reviewed-by: bjorn.
2012-05-05Merge branch '0.6'Thorbjørn Lindeijer1-1/+1
2012-04-04Enabled whispers in tabs by defaultErik Schilling1-1/+1
Reviewed-by: bjorn.
2012-02-18Added notification sound on receiving whisperThorbjørn Lindeijer1-0/+1
One of the sound channels is reserved for notification sounds, of which the volume can be configured separately. Currently, the only notification sound that is played is for receiving whispers. That can be extended later. The newmessage.ogg sound used currently is the one for receiving a message with the Psi instant messenger. Parts of this patch are based on the new message notification in ManaPlus. Reviewed-by: Erik Schilling
2012-01-27Fixed loading of the server listThorbjørn Lindeijer1-1/+0
A wrong (and duplicate) default entry for the 'onlineServerList' option for branding files was causing it to malfunction. The problem only showed up after the initialization of defaults was changed in commit b856e8b47ab2dfd393e3c2720c5647eb66393931. Before that, branding config file defaults were not being set when no branding file was used. Reviewed-by: Yohann Ferreira
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2012-01-24Stream music files directly from the archivesThorbjørn Lindeijer1-1/+1
Use Mix_LoadMUS_RW to stream music files directly from PhysFS. I kept around ResourceManager:copyFile for now, since it may have other uses. Also cleaned up some initialization of configuration defaults. Reviewed-by: Yohann Ferreira
2012-01-16Increased the default font sizeThorbjørn Lindeijer1-1/+1
Just to make everything a bit more readable on modern screen resolutions. Reviewed-by: Yohann Ferreira
2011-09-30Fixed a typo in a default value.Yohann Ferreira1-1/+1
2011-05-13Made the setup keyboard tab prettier.Angelo Castellani1-0/+1
Incidentally I added support for a monospaced font (which may come in handy).
2011-04-30Added customizable on-hit effects for characters.Yohann Ferreira1-0/+2
This patch adds support for the following two parameters in weapon items: hit-effect-id: Effect triggered on the victim on normal hit. critical-hit-effect-id: Triggered on the victim on critical hit. (Specified in effects.xml) The patch also permits the use of custom defaults set in paths.xml by setting the following keys: (Paths are relative to the 'particles' key value, here.) hitEffectId: defaulted to effect id 26. criticalHitEffectId: defaulted to effect id 28. Resolves: Mana-mantis #337. Reviewed-by: bcs86
2011-04-09Removed the Mana namespaceThorbjørn Lindeijer1-2/+0
It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams
2011-01-27Made the windows app able to load .ico files at runtime.Yohann Ferreira1-1/+1
Now the icon extension is computed against the os, except for mac where the behaviour is left untouched. This means that the 'icons/mana' appIcon branding parameter will now load icons/mana.png files for unices, and icons/mana.ico for Windows. Reviewed-by: Trapdoor. Resolves: Mana-Mantis: #135.
2010-12-06Removed superfluous #includes taken from checkheaders list.Yohann Ferreira1-2/+0
Resolves: Mana-Mantis #265. Trivial fix.
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-0/+1
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-07-30Changed the FloatData class to store double instead of single floats.Yohann Ferreira1-0/+5
Also fixed a few compile warnings.
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-0/+177
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.