summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-02-09Some cleanups in UpdaterWindow and BrowserBoxThorbjørn Lindeijer4-170/+79
Doing some cleanups before working towards optimizing this code. Removed needless additional wrapping code in BrowserBox::addRow, since the text will be relayouted anyway. Simplified layouting code a little. For example, there's no need to keep track of the number of wrapped lines. Use more optimal data structures, like an std::deque for the text rows and a plain std::vector for the line parts. Both have less fragmentation than an std::list.
2024-02-09C++11: Use default member initializersThorbjørn Lindeijer53-303/+174
This patch is not exhaustive.
2024-02-07Introduce .gitlab-ci.ymlThorbjørn Lindeijer2-2/+28
This just checks that the client compiles on Ubuntu for now. Also fixed a PhysicsFS linker issue introduced in ffa8ea13fbf50ad59d9fc4cea71b9aec4aca8bac...
2024-02-07Added libpng-dev to Ubuntu dependenciesThorbjørn Lindeijer1-1/+1
It is used for writing screenshots.
2024-02-06Fixed crash when taking a screenshotThorbjørn Lindeijer1-1/+5
Wrong format was passed to SDL_RenderReadPixels. Issue introduced in 2c51c98625b225cecfb9628c30d62d4e30f7e3e1. Closes #52
2024-02-05Removed use of deprecated std::unary_functionThorbjørn Lindeijer1-9/+6
2024-02-05Updated C++ standard to C++17Thorbjørn Lindeijer4-16/+28
C++17 should be universal enough by now. This raises the minimum CMake to 3.8, which should also pose no problem since Ubuntu 18.04 already shipped with CMake 3.10. C++17's 'if' initialization statement is now used in an efficient implementation of 'join' for vector<string>, found on StackOverflow.
2024-02-05Use SDL2 to show a simple message box on errorThorbjørn Lindeijer4-55/+5
Replacing the various OS-specific ways implemented for macOS, Windows and Linux (based on xmessage).
2024-02-05Added gettext dependency to README.mdThorbjørn Lindeijer1-1/+1
2024-02-05Require PhysFS 3.0Thorbjørn Lindeijer3-62/+3
It seems the implementation of PhysicsFS RWops shipped requires a somewhat up-to-date PhysFS (beyond just a missing PHYSFS_DECL macro). Also simplified CMake files somewhat, enabling new behavior for some policies that were triggering warnings. And removed the no longer used FindSDL_gfx.cmake module (SDL_gfx is found using pkg-config since 2c51c98625b225cecfb9628c30d62d4e30f7e3e1).
2024-02-02Fixed use of deprecated CURLOPT_PROGRESSFUNCTION optionThorbjørn Lindeijer2-10/+13
Closes #51
2024-02-02Restored support for setting monster ID offset on monsters tagThorbjørn Lindeijer5-4/+28
Apparently this was supported before, but support for that was lost in bd1fdd87eed48ba3ffcc413936d6a6a60a429a97. Fixes #46
2024-02-02Fixed CMakeLists.txt reference to README.mdThorbjørn Lindeijer1-1/+1
Hadn't expected 87470d984cc8f6fe12a354aec7bf93ee4fcb95eb to break the build, heh.
2024-01-30Apply readability-delete-null-pointer fixitsThorbjørn Lindeijer5-24/+11
These checks are unnecessary as deleting a null pointer has no effect.
2024-01-29Updated README and converted to MarkdownThorbjørn Lindeijer1-39/+58
2024-01-29Fixed logic error in ManaServ::BeingHandlerThorbjørn Lindeijer1-5/+6
2024-01-29Removed unused SpecialEntry::mLevelLabelThorbjørn Lindeijer1-2/+0
2024-01-29Removed unused includes in various filesThorbjørn Lindeijer20-41/+7
2024-01-29Removed remnants of alpha cache in ResourceManagerThorbjørn Lindeijer3-38/+0
Continuation of 2c51c98625b225cecfb9628c30d62d4e30f7e3e1, which had already removed most of the alpha cache in Image.
2024-01-29Updated ChatLogger::secureName to fixed versionThorbjørn Lindeijer2-9/+19
Using the latest implementation from ManaPlus. Previous version was introduced with 844e9a7a72faca6a212e788a3adc45e17f41dca6 and failed to "secure" the name due to broken conditions.
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer70-542/+409
modernize-loop-convert modernize-deprecated-headers
2024-01-29Updated PhysFS RWops helper to the latest versionThorbjørn Lindeijer2-59/+117
Fixes compatibility with SDL2. The old version compiled for whatever reason, but it would crash when the client tried to play a sound.
2024-01-29Fixed another crash due to incomplete SDL2 upgradeThorbjørn Lindeijer1-1/+1
SDL_GetKeyboardState array needs to be indexed by scan codes.
2024-01-28Fixed crash due to SDL2 porting issueThorbjørn Lindeijer1-1/+2
SDL_GetKeyState used to return an array that is indexed by SDLKey, but its equivalant, SDL_GetKeyboardState, returns an array that is supposed to be indexed using SDL_Scancode.
2024-01-28Added support for map/layer maskThorbjørn Lindeijer11-65/+188
A custom "Mask" property on a layer or a "foregroundXmask" property on a map can now be used in combination with the SMSG_MAP_MASK to dynamically disable certain map layers from the server. Feature previously seen on ManaPlus and implemented for Mana client for compatibility. Also added a ResourceRef class for automating the Resource reference counting. Closes #44
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-26Apply C++11 fixitsThorbjørn Lindeijer357-1948/+1946
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2024-01-26Added support for the "persistentIp" server info settingThorbjørn Lindeijer6-38/+38
This option was added in ManaPlus and support for it is required to connect to The Mana World as it is currently set up, since the server sends 127.0.0.1 for the character server and map server IP. Can't play yet, because of an unknown packet 0x226 being received once connecting to the map server.
2024-01-26Disable "opengl" by default and remove unused "hwaccel" optionThorbjørn Lindeijer2-5/+3
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.
2024-01-25Always use C++11 and remove related compatibility option/codeThorbjørn Lindeijer5-23/+5
2024-01-25Removed X11 dependencyThorbjørn Lindeijer2-9/+0
It was only used for the clipboard, which is now interacted with through SDL 2.
2024-01-25Fixed parent for OkDialog in social windowThorbjørn Lindeijer1-1/+1
2024-01-25Added assignment operator for VectorThorbjørn Lindeijer1-0/+8
2024-01-25Minor includes cleanupThorbjørn Lindeijer6-15/+0
2024-01-25Ported to SDL2Thorbjørn Lindeijer35-1100/+656
2024-01-24Increased client version to 20Thorbjørn Lindeijer1-1/+1
It is unclear whether there are any protocol differences that should be dealt with at this point, but without this the login fails with "Client too old." error.
2024-01-24Add error for non tradable items.Andrei Karas1-0/+5
2024-01-24Removed project files for Qt CreatorThorbjørn Lindeijer6-599/+2
Qt Creator can just open the CMakeLists.txt these days.
2024-01-24Fixed potential crash on exitThorbjørn Lindeijer2-4/+3
2024-01-24Removed undefined '__EXPORT__'Thorbjørn Lindeijer1-5/+4
There should be no need to export the functions explicitly, given that they are compiled as part of the executable.
2024-01-24Fixed a few coding errors the compiler complained aboutThorbjørn Lindeijer3-3/+3
2024-01-24Fixed compilation issues and use of deprecated C++ featuresThorbjørn Lindeijer15-44/+44
* Fixed compiler errors due to dynamic exception specifications * Replace std::auto_ptr with std::unique_ptr * Replace std::mem_fun with std::mem_fn * Prefix for_each with std:: (apparently not needed before) * Just use lambda instead of std::bind2nd * Removed usages of std::unary_function
2024-01-24Updated website URL to httpsThorbjørn Lindeijer1-1/+1
2013-09-08Fixing packet length of CMSG_NPC_STR_RESPONSEStefan Dombrowski1-1/+1
The CMSG_NPC_STR_RESPONSE packet transmits a string of variable length.
2013-06-15Fixed minor issues in the russian translationKenny6901-3/+3
2013-06-15Added Kenny690 to the AUTHORS fileErik Schilling1-0/+1
2013-06-15Updated russian translationKenny6901-430/+407
2013-06-08Fixed MessageIn::getUnreadLengthThorbjørn Lindeijer2-2/+8
It should not return large numbers after reading past the end of a message. This can cause infinite loops in several places in the client when a message happened to be shorter than expected.
2013-05-22paths.xml content is now read from settings.xmlPrzemysław Grzywacz3-11/+21
2013-05-09Changed default serverlist.xml URL to avoid redirectThorbjørn Lindeijer2-2/+2
Previously the redirect was from www.manasource.org to manasource.org.