Age | Commit message (Collapse) | Author | Files | Lines |
|
Also enable using `cpack -G DragNDrop` to create a DMG to easily drag
Mana into the Applications folder.
The DMG is also available as a CI artifact.
The minimum deployment target has been set to 10.15, as required due to
usage of std::filesystem::create_directories.
|
|
This should make CMake options a little more standardized. The Windows
part could potentially still be unified further.
Absolute paths are now only used for the defines and not for values
going to install() commands.
|
|
It appears that either SDL or the system is already taking care of
scaling the cursor to the display scale (observed on both macOS and
Wayland). Hence, we should only scale the cursor by the user scale and
not by both.
Follow-up to 6eca1b485dba7355d827745284ed2f0072f9e370.
|
|
The loading of effects.xml has ended up being duplicated, with an
implementation in getEffectDescription in actorsprite.cpp as well as in
EffectManager. But the one in actorsprite.cpp was actually never used.
|
|
Regression introduced in 14dc8218eeebd1583e6bd3c49013b3e501f47228.
|
|
Shows outlines of visible widgets as well as highlighting modal focus,
modal mouse focus and regular focus.
Can currently only be toggled in the Debug window, so needs source code
modification to be used during login sequence for now.
|
|
Automatic reference counting of images is now used by Item, Icon,
AnimatedSprite, ImageSprite, ParticleEmitter, Minimap, Desktop and
Emote.
Since ResourceManager::get automatically adds a reference, it needs to
be explicitly subtracted when the resource is managed by ResourceRef.
This is taken care of by the new ResourceManager::getImageRef.
Also removed the apprently unused and duplicate "mDrawImage" from Item
(which also didn't get decRef called on it).
Fixes cleanup of emote ImageSet and ImageSprite instances, as well as
particle images.
|
|
The linker could not find _nl_locale_name_default. Maybe it could be
fixed by linking to another library, but it would likely not yield the
preferred behavior. Instead, we now use GetUserPreferredUILanguages to
set the LANG environment variable with one or more languages and let
gettext choose the best fitting available translation.
Also fixed the directory from which the translations are loaded to match
the installation directory,
|
|
Works without in MSYS2, at least.
|
|
Set SDL_HINT_WINDOWS_DPI_AWARENESS to "permonitorv2", which tells
Windows the application will handle all scaling.
We don't currently adjust the window size when it changes monitors, but
mainly use this hint to disable scaling by the system, since that blurs
fonts and pixel art. Once we can properly handle fractional scaling
(which is common on Windows), we can set SDL_HINT_WINDOWS_DPI_SCALING to
"1" instead.
|
|
The configured file wasn't actually being used, because it was not in
the include path. Instead, a checked in version was used.
In addition, winver.h is an existing Windows header, which was
conflicting with the generated file. Instead, now mana.rc itself is
configured. We didn't actually need winver.h anywhere else, anyway.
|
|
This relies on Windows 10 version 1803 (10.0.17134.0), which is
hopefully an acceptable minimum. It fixes handling of paths with special
characters.
|
|
Should be a lot less fragile and might also help to resolve encoding
issues.
|
|
* Set the version, description and homepage URL using modern CMake
style (minimum supported version increased to CMake 3.12).
* Fixed the reference to the MUI_WELCOMEFINISHPAGE_BITMAP file, which
needed "\\" instead of "/" to work for me in MSYS2, and with
CPACK_VERBATIM_VARIABLES enabled (otherwise "\\\\" was needed).
* Fixed the icon used for the uninstall entry by setting
CPACK_NSIS_INSTALLED_ICON_NAME.
* Fixed missing start menu entry by setting CPACK_PACKAGE_EXECUTABLES.
* Fixed running Mana when finishing the install by setting
CPACK_NSIS_EXECUTABLES_DIRECTORY.
* Mark the NSIS installer as DPI-aware using
CPACK_NSIS_MANIFEST_DPI_AWARE.
* Enabled uninstall before install using
CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL.
|
|
Ported from CSIDL to newer FOLDERID API and used wcstombs_s to
convert the returned path to a multi-byte string.
Fixes issues when the Windows username contains special characters.
|
|
Also added instructions for installing the dependencies on MSYS2.
The selection of the default language is commented out for now. It will
be fixed in another change.
|
|
* Removed some unused includes
* Removed unused ListBox::mFont
* Removed wrong cast to SDL_Scancode
* Removed superfluous .c_str()
* Removed superfluous explicit std::string construction
* Removed unused variable
* Use more emplace_back
* Turned FindBeingFunctor into a lambda
* Avoid needless pointer references for ambient layers and use a vector
|
|
Broke in 474442f1a49d29d85de769c4fbb3aa8636877b49 due to changing the default
padding on the Popup class.
|
|
Most prominently, fixes the tooltips on the window buttons being clipped
due to their position being slightly outside of the clipping children
area. And fixes NPC tooltips from having a lot of empty space below the
NPC name.
Also reduced the space between texts in the item tooltip to match the
padding rather than being an entire empty line.
|
|
Quote from Fedora mailing lists:
The latest released versions of libxml2 have a couple of important
changes in header files that have unintentionally caused some packages
to fail to build without modification, including:
* several functions now accept or return a const xmlError struct
* cyclic dependencies in header files were fixed (by dropping some includes)
|
|
So that one can choose to build with the Guichan submodule also on
other systems than macOS.
|
|
This way the cursor is not limited by the framerate nor affected by
input lag. Also, when custom cursor is disabled, a few different system
cursors are now used instead.
It also avoids an issue on Wayland, where hiding the cursor (as done to
render our own one) would cause the cursor to get locked within the
window.
On macOS it fixes two cursors being visible when hovering the window
while it is in the background.
The cursor can unfortunately no longer gently fade away.
|
|
* TrueTypeFont class now takes into account the graphics scale, in order
to render an appropriate higher-resolution texture.
* Removed TrueTypeFont::fontCounter, since TTF_Init/TTF_Quit already
keep a counter.
* Avoid copying the rendered string needlessly, when it already exists
in the cache. Avoid another copy, when inserting a new chunk into the
cache.
|
|
This can be used for smoother mouse cursor movement when rendering our
own mouse cursor (already changed in this commit) and is also necessary
for implementing support for HiDPI font rendering.
Also dropped some almost duplicated OpenGL code.
|
|
This is generally expected on Linux, where it feels annoying that the
initial click just focuses the window.
On macOS it's a little bit different, since applications can be specific
about which elements are directly clickable and which aren't, but in
general it feels better to me when the UI can be interacted with
directly.
|
|
Now a text chunk has a maximum length of 4k characters, but that should
be plenty of space since they're only single lines.
|
|
We can use vsnprintf to write to the std::string directly.
|
|
* 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.
|
|
It did not distribute them when the value of the DropDown was changed by
key events or mouse wheel.
|
|
* ResourceManager::addResource
* ResourceManager::get(const std::string &)
These were once added in 32996cee607c52ecef9be4638df554dd89b39c24, but
they are no longer necessary after the port to SDL2
(2c51c98625b225cecfb9628c30d62d4e30f7e3e1).
|
|
|
|
Simplifies the code a little.
Also use ResourceRef in SubImage to avoid manual reference counting.
|
|
Amendment of dd1db3753ecf8a4d782aee1f518759763d8caf87.
|
|
|
|
Ubuntu 20.04 had SDL 2.0.10, and it is still supported.
Also added error handling to the SDL_OpenURL call, just in case.
|
|
* 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
|
|
* Use ConfirmDialog to confirm the opening of the external link.
* ConfirmDialog now centers on its parent window when provided.
* Reset hovered link when mouse exits the BrowserBox.
|
|
The 'Play' button was continuously requesting focus once the updates had
been downloaded.
|
|
Since the upgrade to SDL2 it was only used for framerate limiting, which
I've replicated in a small helper class.
Also reduced the framerate limit while minimized from 100 to 10 FPS.
|
|
|
|
I had broken this in 264be2108c51837fa92085f6c839e66aebbcfc9e by no
longer reading out the property.
Made some further simplifications and two more fixes:
* When the original image's size was not 800x600, it wouldn't get scaled
as expected due to the integer division being performed before the
multiplication.
* I had changed the default resolution to 1280x720, while mKeepRatio
expects to scale the original image as if it was displayed on an
800x600 screen. So now it's hardcoded on 800x600 rather than using
the defaultScreenWidth/Height variables.
* Removed the confusing x/y parameters from AmbientLayer::draw, which
were actually set to the graphics width/height.
* Changed SDLGraphics::drawRescaledImagePattern to not repeatedly
set the source origin.
|
|
Rewrote the tile animation loading code based on XML tags, replacing
the code that loaded tile animations from tile properties.
Also made a number of code simplifications and optimizations:
* Replaced a number of pointer members with value members.
* Pass around Animation and TileAnimation by value, using std::move to
avoid allocating copies.
* push -> emplace
* push_front -> emplace_front
* push_back -> emplace_back
* Use range-based for loops
* Use std::vector instead of std::list for storing affected tiles
(less fragmentation)
* Avoid string copies and allocations while parsing CSV layer data.
* Replaced xmlNodeGetContent with directly accessing 'content'.
|
|
The affected tiles were only tracked for base64-encoded layer data.
|
|
* Use final for all message handlers, Client, LocalPlayer,
Being::getType, Being::setPosition and Being::setMap.
(avoids some warnings about virtual dispatch in constructors)
* Use auto in more places
* Use emplace_back instead of push_back in some places
* Use default member initializers
* Less else after return
* Removed superfluous .c_str()
* Removed type aliases that are only used once
* Removed more unused includes
|
|
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
|
|
This only adds support for the NPC_CLOSE_DIALOG and
NPC_CLEAR_DIALOG sub-commands.
Closes #47
|
|
* Fixed duplication of player name in chat
Closes #49
|
|
Also made it exit with error when there is an unknown option or missing
argument.
|
|
|
|
Usually this would be guessed correctly by the port, but now it is also
possible to just specify the server type and the port will be derived
from there, unless a default port is given in the branding file.
Closes #56
|