summaryrefslogtreecommitdiff
path: root/src/resources/settingsmanager.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-07-14Fix quests window destruction and add QuestDB::initThorbjørn Lindeijer1-0/+4
The init call makes sure there are no quests loaded, which is necessary because `SettingsManager::unload` is only called on exit and not when switching servers. Closes #112
2025-07-04Added logging priorities and use SDLs logging facilitiesThorbjørn Lindeijer1-5/+5
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-06-17Add quest database support and parsing utilitiesThorbjørn Lindeijer1-0/+6
- Introduce QuestDB with quest/effect structures and XML parsing - Register questdb in CMake and settings manager - Add fromString overload for std::vector<int> parsing
2025-04-02Use a consistent naming style for enum class valuesThorbjørn Lindeijer1-1/+1
Sometimes I've used CamelCase and sometimes SNAKE_CASE for these values. Since "enum class" values are always prefixed with the enum name, which uses CamelCase, I find it more fitting to use it for the values as well. Also fixes compilation on Windows where 'ERROR' was conflicting with a define.
2025-03-07Support triggering attacks and play use ability animationsThorbjørn Lindeijer1-3/+2
For now, PlayerHandler::attack just tries to trigger the "Strike" ability. Adjusted the AbilityDB to the removal of ability categories and the addition of the useaction attribute (mana/manaserv@81f126ae001b1446dc0be37341f133dca5ab2923)
2025-03-07Renamed ability set to ability categoryThorbjørn Lindeijer1-2/+2
To match mana/manaserv@9c4b8e24487843f0b52108ba99c8c01f03bfae81.
2025-03-07Renamed specials to abilitiesThorbjørn Lindeijer1-15/+6
To match mana/manaserv@9ff69160ea1c3c64ea7012cd70a3b50ff4373264.
2025-02-26Plugged various memory leaksThorbjørn Lindeijer1-1/+0
* 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-02-25Added support for option, opt1, opt2, opt3 status effect fieldsThorbjørn Lindeijer1-10/+12
Supporting these fields is necessary to correctly identify status effects sent by tmwAthena. This is a manual port of ac4e40a1408ad4d6fbcfce9d2bc6a0bc187ea5a4, 542d2ba78d84e0fa051e0620ccab5fb3a0c711e3 and 8800940bb4b94f6dab7dcf80bf0abc3e3b09e35f from M+.
2025-01-20Made client config statically typedThorbjørn Lindeijer1-1/+1
This makes accessing the config values much faster, since it no longer needs to do a lookup nor string conversion, which means we could remove some needless copying of the values. Overall it makes it easier to find out where settings are used and it puts the defaults along with the declaration. Options with default values are no longer saved to the config file. This does not include unrecognized options, which are kept around to provide some compatibility with older clients. While most basic options have kept the same name, more complicated settings like window geometry, shortcuts, outfits, etc. now have their own XML elements. Older clients will ignore these and erase them when saving the configuration.
2025-01-20Cleaned up path handling a bitThorbjørn Lindeijer1-3/+3
2025-01-20Wrapped xmlNodePtr access with a Node classThorbjørn Lindeijer1-30/+27
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-2/+2
The new XML::Children class enables using a C++11 range-based for loop to iterate over the children of an xmlNodePtr.
2024-03-04Fixed character displayThorbjørn Lindeijer1-1/+15
This change fixes hair style to take into account "race", which makes the faces visible again. Hair colors should also be fixed now, with partial support for itemcolors.xml added. The Mana client now also supports per-character gender, and it now hides the hair style and color buttons on character creation, when there are none to choose from. Closes #43
2024-03-02Changed server type to "enum class"Thorbjørn Lindeijer1-1/+1
2024-02-02Restored support for setting monster ID offset on monsters tagThorbjørn Lindeijer1-0/+8
Apparently this was supported before, but support for that was lost in bd1fdd87eed48ba3ffcc413936d6a6a60a429a97. Fixes #46
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-1/+0
modernize-loop-convert modernize-deprecated-headers
2024-01-26Added fallback for XML data files and support absolute pathsThorbjørn Lindeijer1-14/+34
For compatibility with TMW, which has not yet adopted a central "settings.xml" that includes all the other files. Also, a "name" attribute with an absolute path is now supported in addition to the relative "file" attribute, since that is what ManaPlus supported. This resolves most of issue #43.
2024-01-24Fixed potential crash on exitThorbjørn Lindeijer1-2/+2
2013-05-22paths.xml content is now read from settings.xmlPrzemysław Grzywacz1-2/+15
2013-05-07items.xml can be used from settings.xmlPrzemysław Grzywacz1-1/+9
2013-05-04Client-side settings are now available from settings.xmlPrzemysław Grzywacz1-0/+191