Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Made the class and the code in general more readable by removing all
the needless getters and setters.
Also used "enum class" for SoundEvent.
|
|
* 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
|
|
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 patch is not exhaustive.
|
|
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
|
|
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
|
|
An optimization in the tile layer rendering code meant for drawing
repeated tiles faster was not taking into account the case where the
tile width does not match the width of the tile grid.
Reviewed-by: Stefan Beller
|
|
Maybe it used to be necessary for these methods to be virtual, but this
is no longer the case. Hence we can avoid wasting CPU ticks searching
through virtual function tables, especially for frequently used methods
like getWidth, getHeight and setAlpha.
MapLayer::getTile was inlined.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Ablu
|
|
It makes no sense to mark a return value as const when it is returned by
value. This only makes sense if the return value is passed by reference, in
order to prevent the receiver from modifying the value.
Also made some other small adjustments. A std::string does not need to be
initialized to "" explicitly and getSafeUtf8String could take its parameter by
reference.
Reviewed-by: Yohann Ferreira
|
|
This reverts commit 92fd074aa85e2357bfe1ab642209dd5a0d87e4d5.
Reverting because these checks should be done server-side and because having
them in the client would currently require wrapping them up in checks if
there is even a current map due to the reliance on tile size (we need to
handle the case where the current map didn't load properly without crashing).
Conflicts:
src/map.cpp
src/net/manaserv/beinghandler.cpp
Reviewed-by: Erik Schilling
|
|
Better to show non-rotated/flipped tiles than no tile at all. This also
fixes interpretation of collision tiles that happen to be flipped.
Also interpret the gid as an unsigned number, since that's how they are
written in the TMX file since the introduction of these flags.
Reviewed-by: Yohann Ferreira
|
|
I also made the range be taken from the server type
as for the pickup and npc talk ranges.
Last but no least, I fixed the parameters sent with
PGMSG_PICKUP to send the (item) position where to pickup at
as described in the manaserv protocol.
The pickup is still not 100% functional due certainly
to two problems:
1. The client item coordinates might not be the exact same as in the server.
2. The client seems to try to pick up the item a bit too soon,
probably for the reason given in 1.
I'll investigate this in another patch.
Reviewed-by: Thorbjørn Lindeijer, Erik Schilling.
|
|
|
|
Their name is a bit more clear with DEBUG prefix rather than MAP
prefix. They're already scoped in the Map class anyway.
MAP_NORMAL was changed to DEBUG_NONE to represent no debug flags.
Acked-by: Bertram
|
|
Trivial.
|
|
Conflicts:
CMakeLists.txt
src/map.cpp
src/winver.h
|
|
The layer rendering code was not prepared to handle tiles that were
wider than the tile width of the map.
This commit also fixes the initialization of the maximum tile height,
which was based on the map height rather than the tile height. This
could slightly reduce overdraw for some maps.
Reviewed-by: Stefan Beller <stefanbeller@googlemail.com>
|
|
|
|
Every files has been checked against the hard coded
32 values except the map.cpp file.
I also added convenience functions in the Game class,
centralized the default item icon size, and removed two
unused defines in being.cpp.
|
|
Reviewed-by: Bjorn
|
|
Reviewed-by: Bertram
|
|
This is fixng many issues and (hopefully) will make the movement
rendering much smoother.
Merge branch 'master' of gitorious.org:~bertram/mana/mana-movement-code-merge
Conflicts:
src/being.cpp
src/net/manaserv/beinghandler.cpp
Resolves: TMW-Mantis #946.
Reviewed-by: Thorbjorn.
|
|
- Removed unnecessary comments
- Removed a useless contains() check in getTileCenter()
- Fix the above function documentation
- Don't permit FloorItem to be created without a map object.
Reviewed-by: Thorbjorn Lindeijer.
|
|
I have to admit I contributed a large part of these. Sorry for that.
Less empty space, more attention to the code.
Acked-by: Jared Adams
|
|
I also precised the find/Pixel/Tile/Path() documentation.
|
|
and made use of it through the tA code.
I also remove the obsolete TODO in the flooritem class.
|
|
I made it so that the behaviour can be changed with only
a boolean setting in the playerhandler.
|
|
This prevent some weird things happening in path finding when
playing for a very long time.
Reviewed-by: Thorbjorn.
|
|
Reviewed-by: Bertram
|
|
Conflicts:
data/graphics/CMakeLists.txt
data/graphics/Makefile.am
src/client.cpp
|
|
Reviewed-by: Thorbjørn Lindeijer
|
|
The Actor class manages the Map reference, position vector, and alpha float.
These are the common parts from it's children.
|
|
It permits two things:
1. It simplifies and demystifies Being::SetDestination() code.
2. It will permit to show the *real* calulated path when using
the drawDebugPath feature for ManaServ.
|
|
Fix Random crushes and valgrind memory errors.
Reviewed-by: thorbjorn
|
|
particle effects. Reviewed-by: Jared Adams <jaxad0127@gmail.com>
|
|
|
|
|
|
But I added some logs when speed and other actions where refused due to game/map
uninitialized. This could help.
|
|
|
|
This is the First step to get rid of most hardcoded 32 values.
|
|
Also added the update copyright tool from the Wormux Team.
( And not forgetting credit's due. :P )
|
|
|
|
Looks for "graphics/minimap/MAPID.png"
|
|
Also remove some extra new lines and fix eAthena's PartyTab define guards.
|
|
|
|
This mode hide big map objects and show collisions.
|