Age | Commit message (Collapse) | Author | Files | Lines |
|
Now when NPCs text includes "###MoveUp;", it will get replaced by "Up",
or whatever key is currently bound to that action.
For compatibility reasons the key name can optionally have a "key"
prefix, for example "###keyMoveUp;".
Closes #73
|
|
Code appeared duplicated just because we don't draw the background, but
this could be done by overriding drawBackground instead.
|
|
No longer supported by manaserv and not supported by tmwAthena.
|
|
|
|
For historical reasons, sprites get a 16 pixel offset by default, which
is used to position them correctly on their tile.
When pixel-based movement was added, actors are now positioned on the
middle of a tile and the built-in offset was removed. Servers that use
sprites that do not rely on this offset can now set the spriteOffsetY
option to 0.
|
|
This extends the messages regarding abilities, replacing the specific
"attack" messages. It also unifies attribute handling, with a generic
system replacing specific variables for attributes like level, xp and
skills.
The inventory and equipment handling was adjusted such that equipped
items stay in the inventory.
Support for quest states was added.
Added:
* GPMSG_ABILITY_REMOVED
(mana/manaserv@e3fcc1a47db312933a0f5b7e725c5779a1a45722)
* GPMSG_ABILITY_COOLDOWN
(mana/manaserv@c2f00b2f3ba920cb25333d19a1d37d251342caf8)
* GPMSG_BEING_ABILITY_POINT
* GPMSG_BEING_ABILITY_BEING
(mana/manaserv@2f2393b6d190deb8958fcb806b58418508d25e28)
* GPMSG_ATTRIBUTE_POINTS_STATUS
(mana/manaserv@1e5a15c0a5e24fb4b358fff75a7082d65496e1f9)
* PGMSG_USE_ABILITY_ON_DIRECTION
(mana/manaserv@05fc955a3f8a03539088fa7569395434e29d90e8)
* GPMSG_BEING_ABILITY_DIRECTION
(mana/manaserv@54389afd7ba9fecf0761333185145e968e2453ae)
* GPMSG_QUESTLOG_STATUS
(mana/manaserv@66a98a3a0df795761328d62ef2ad07f81e383f9e)
Removed:
* PGMSG_ATTACK
* GPMSG_BEING_ATTACK
(mana/manaserv@f31277b327df701361391b1d4b8bd6f89f4e3109)
* GPMSG_PLAYER_EXP_CHANGE
* GPMSG_LEVELUP
* GPMSG_LEVEL_PROGRESS
(mana/manaserv@44ee071d7ece5a2023f79307f36e8a244c9e7b3a)
Changed:
* GPMSG_ABILITY_STATUS
(mana/manaserv@ba573fcc38580a01985172b9bc864c97ce855af3)
* GPMSG_BEING_LOOKS_CHANGE
(mana/manaserv@8ddda85d923a528c7497a628d2fe10fc40b80a1f)
* APMSG_CHAR_INFO
(mana/manaserv@4f5053f463fd8da0de1615ca6b0f212f02f3d653)
* APMSG_CHAR_CREATE_RESPONSE
(mana/manaserv@1263c729d85df649c7ab59726bddad7c8cd7ae81)
* GPMSG_NPC_BUYSELL_RESPONSE
(mana/manaserv@336ce321a9b996e56a61a5364bb32124efa84dd9)
Equipment changes (mana/manaserv@f712d68495dd8e040c32da3b1c85bcb7845543ec):
* Changed GPMSG_INVENTORY_FULL, GPMSG_EQUIP
* Removed PGMSG_MOVE_ITEM
* Added GPMSG_EQUIP_RESPONSE, GPMSG_UNEQUIP_RESPONSE, GPMSG_UNEQUIP
While this change deals with some of the protocol changes, there's still
many changes required in the UI regarding using of abilities (including
attacking), showing of certain attributes and quest log.
|
|
To match mana/manaserv@9ff69160ea1c3c64ea7012cd70a3b50ff4373264.
|
|
* Moved the memory buffer and mutex handling into the Download class to
simplify the code updating the UI in ServerDialog and UpdaterWindow.
* Replaced the "DownloadUpdate" callback function with simply polling
Download::getState, since in the end polling was happening anyway.
This changes also fixes handling of the Enter key while downloading
updates, which no longer cancels the update process. Also, when pressing
Escape while things are being downloaded, the first press cancels and
only the second press goes back to login.
Introduced a ThreadSafe template class, which wraps any type and makes
it only accessible by calling lock(). This ensures the data is never
accessed without locking the relevant mutex.
|
|
The UI became unresponsive as a result of not actually deleting the
OkDialog. The dialog is now managed by the AwayListener, which now
schedules Away dialog for deletion when necessary, using a DeathListener
to clear the reference to the dialog.
The WindowContainer now uses an std::set instead of std::list to keep
track of widgets scheduled for deletion, to avoid crashing when a widget
is scheduled for deletion multiple times.
|
|
* DebugWindow and SkillDialog were not deleting their tabs nor their tab
widgets.
* TabbedArea was not deleting its arrow buttons.
* Button was deleting its TextPopup on deletion of the last Button
instance, which was wrong because it was also being deleted by the
WindowContainer. Also removed some misplaced event forwarding to the
TextPopup.
TabbedArea is tricky because it does not automatically delete added tabs
or their widgets. Tab instances are only deleted when they were added by
name.
Issues found by Valgrind memory analyzer.
|
|
* 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.
|
|
All ResourceManager functions that load resources now return respective
ResourceRef values, which helps to make sure resources are properly
cleaned up.
The Sound class was cleaned up and now also allows SoundEffect resources
to be unloaded.
The Animation class now keeps its ImageSet loaded only as long as
necessary. Previously, SimpleAnimation and ParticleEmitter would keep
the ImageSet loaded indefinitely by never decreasing its reference
count.
Reduced duplicated animation loading code between SimpleAnimation and
ParticleEmitter.
|
|
It triggers the following warning on MinGW:
warning: unknown conversion type character 'z' in format [-Wformat=]
Since we don't expect the number of online players to go beyond
UINT_MAX, we can simply do a cast and use %u instead of %zu.
|
|
The download thread was setting itself to nullptr (d->mThread = nullptr)
in a number of locations. This caused a later call to SDL_WaitThread to
be unable to perform cleanup.
This reverts most of 1eb02f83a5d3895e4e18db30ea10d88da94ba4c0 (including
making Download::cancel no longer blocking), but keeps the necessary
waiting for the thread to finish before freeing the memory buffer in
~UpdaterWindow(), which might have been the bug fixed by that change.
Fixed removal of downloaded .part file when its checksum failed. It
trying to remove the file without .part appended instead.
Fixed download progress indication in ServerDialog to not be reversed,
though this is rarely visible due to the server list being so small.
Fixed reporting of curl error.
|
|
Based on the name attributes in the status-effect XML elements.
Also cleanup the code a little. Since the MiniStatusWindow now adjust
its size to respect the status icons, those icons no longer have to be
drawn from the Viewport.
|
|
The status effect icons are implemented as sprites. Traditionally, since
sprites were rendered on the map, they were by default centered
horizontally on a tile and aligned to the bottom of the tile. The
necessary offsets were part of the animation frames.
This was changed in ae4aea451d6e2c44b273c963026c4fd697568f79 and
0248b2f58c783f21b7e68a20deadc0a3f942c869, which moved this offset to be
applied at a later stage. At that point, client data was changed to
remove this offset from the status effect icons, where it wasn't
meaningful.
Unfortunately, those client data changes were later reverted because the
M+ fork of the client still applies the above offsets to the animation
frames. Hence, to fix the status icon sprite positions, Mana client now
applies the same offsets when rendering the status icons.
Closes https://git.themanaworld.org/mana/mana/-/issues/95
|
|
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+.
|
|
Fixed leaking of Sprite instances.
|
|
With AnimatedSprite being the only implementation of the Sprite
interface, there was no longer a point in separating these.
|
|
The only use of ImageSprite was for FloorItem instances, which now just
draw the item icon in FloorItem::draw.
This leaves only one Sprite subclass, AnimatedSprite, which means we can
remove the entire virtual Sprite interface.
|
|
Emotes just need an image to be represented in the UI, so we don't need
to use ImageSprite.
|
|
AnimatedSprite works with delta time since 7de0b165f196cb0c1f983b6d2a.
Adjusted some parameter names for clarity.
Closes https://git.themanaworld.org/mana/mana/-/issues/94
|
|
* Wrapped remaining PhysFS API calls and set PHYSFS_DEPRECATED to
suppress deprecation warnings for PHYSFS_getUserDir, since no
alternative is available for now.
* Removed support for decompressing .gz files, since it has been unused
for years and doesn't seem useful when updates are anyway served in an
archive.
* Use SDL_LoadFile and SDL_LoadFile_RW convenience functions (raises
minimum SDL version to 2.0.10).
* Removed ResourceManager::copyFile, since it was unused and will likely
stay unused.
* Removed ResourceManager::loadTextFile. Instead, split up the string in
BrowserBox::addRows without making additional copies.
|
|
* Most direct PhysFS calls now contained within a single header file.
* File class that automatically closes.
* Files class allows iterating files with range-based for.
* Use std::optional to force error handling where applicable.
|
|
This appears to have been a regression in
f405849b49614254f42eb3ee6147434458978623, which for some reason erased
the port (and any trailing parts) from not just the update directory but
also from the update URL.
Unfortunately we can't access Mana-Mantis #381 at the moment, but
presumably the port was removed due to the colon being a problematic
character. Instead, now the colon (and other special characters) are
replaced by _ when determining the update directory.
Closes https://git.themanaworld.org/mana/mana/-/issues/80
|
|
Thanks to https://github.com/cgmb/guardonce and a follow-up replace to
remove duplicated newlines at end of file:
find src -type f -name '*.h' -exec \
sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \;
Source: https://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof
Fixes compile on macOS, which appears to have been due to the EVENT_H
include guard.
|
|
No need to wait for Apply for this option.
Using `ConfigOptionChanged` event rather than direct call into
`ActorSpriteManager::updatePlayerNames`.
|
|
With the statically typed config we no longer get an event for each
changed config value. Where relevant, this is now done through
`setConfigValue`.
The `Event` now uses a `std::any`, which for `ConfigOptionChanged`
events is set to the changed `Config` member. This allows for a
type-safe check on which config value was changed.
|
|
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.
|
|
Slightly more ergonomic and this eliminates direct libxml2 usage from
many places.
|
|
Less code to achieve the same thing (strong type and namespaced values).
The permissions related values have been moved to a PlayerPermissions
struct, which is also a bit less confusing.
|
|
Previous implementation was O(n^2), doing lots of work (saving file and
updating UI) for each removed player.
|
|
* Don't use `PlayerRelation*` in `mRelations`, but just store the value.
* Pass `std::vector<PlayerIgnoreStrategy *>` by reference instead of
pointer.
* Return player list in `PlayerRelationsManager::getPlayers` by value
instead of pointer.
Overall these changes simplify the code, making it less prone to errors.
|
|
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.
|
|
Seems to be no point in using a macro here.
|
|
Mostly adjustments based on feedback from the Finnish translator.
|
|
The Shortcuts window could no longer be moved since adding support for
resizing windows at the top edge. Now there is again a bit of space
where the window can be grabbed.
Included some related cleanups.
|
|
Fixed with clang-tidy `readability-static-accessed-through-instance`
check.
|
|
|
|
Based on MV commit db452921bafb2dd322b52c1e5d03e5e713849dd0.
|
|
Now the experience mightes better with what it was before the logic
update change (59a7d5c58f8b3af21b3e19d4e78f5653bf011bfb). The per-frame
effect is reduced and less constant, based on a sine wave.
The effect is no longer applied directly to the mPixelViewX/Y values,
but is rather only taken into account when rendering the view.
|
|
There was a slight stutter in being movement, since each time a being
reached the next position along its path, it would only continue to the
following position with the next logic tick.
Now the logic has been adjusted to keep moving until all the time for
the current frame was used up, or the path was exhausted.
A slight stutter remains for keyboard movement, as well as broken walk
animation playback, since it will only set a new path once the current
one is finished (see e554d9b2be1ec2fcb15065ae70151302adeef602).
Also simplified some logic in Viewport::draw and removed some obsolete
code in LocalPlayer::startWalking.
|
|
The logic update now uses Time::deltaTimeMs() where needed to make it
framerate-independent. This means there will no longer be multiple logic
calls per frame (as was usually the case with logic ticking at 100 fps
whereas the game would generally run at 60 fps).
At the same time, the game can be more precise at higher framerates and
should now run smoother at 144 Hz, for example. Previously the game would
sometimes skip logic ticks at that rate.
This change affects:
* Updating of animations
* Being movement speed
* More moving of manual time variables to Timer
Notoriously, the particle system still does 100 ticks/second.
|
|
The Timer is efficient because it does not depend on incrementing a
counter to keep track of time, nor does it call SDL_GetTicks every time
its state is checked (this happens once per frame instead).
Along with global functions Time::absoluteTimeMs() and
Time::deltaTimeMs(), this replaces previous globals tick_time, cur_time
and get_elapsed_time().
For now, there is still a fixed 100 times per second logic call rate,
but the new Time::deltaTimeMs() function should allow getting rid of
this.
|
|
Maybe it once had a use, but a change in the "Show own name" setting is
already handled by LocalPlayer::event.
|
|
Because "xmlChildrenNode" is a macro defined for compatibility with
libxml1, which we don't support.
|
|
Made the class and the code in general more readable by removing all
the needless getters and setters.
|
|
The new XML::Children class enables using a C++11 range-based for loop
to iterate over the children of an xmlNodePtr.
|
|
InputEvent::mIsConsumed is used to tell the Window it should not change
the mouse cursor as well.
This change also adds a closed hand mouse cursor, though this is unused
for now (might be useful when dragging stuff around).
The new cursors are by meway.
|
|
And removed the manual space character at the start of each line...
|