Age | Commit message (Collapse) | Author | Files | Lines |
|
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Erik Schilling
|
|
Image::SDLgetScaledImage was changed so that it tries to find an existing
scaled version of the image first, and generates it when none exists.
When it needs to generate one, this resource is added to the resource
manager, partly to avoid duplicating the work later but mainly to keep
memory management straightforward.
This function also used to leak the scaled SDL_Surface since it wrongly
assumed that Image::load would free it.
To avoid filling up the memory with scaled wallpapers that are waiting
30 seconds until they will be deleted, the Resource::decRef function was
extended with a parameter that allows telling it what to do with orphans.
Calling decRef with Resource::DeleteImmediately will delete the resource
immediately in case the resource is orphaned.
Reviewed-by: Yohann Ferreira
|
|
Unified Graphics:setFullscreen and Graphics:resize into a single
Graphics:changeVideoMode function that tries to restore the existing mode when
changing to the new mode didn't work, and exists with an error when that also
fails.
Split up handling of SDL_VIDEORESIZE and the adapting to new resolution in the
Client class, so that the second part could also be called when changing
resolution fullscreen mode.
The Video tab in the Setup window now also filters out any modes smaller than
640x480 since the game won't properly adapt to that resolution anyway.
Reviewed-by: Yohann Ferreira
|
|
This is broken with current TMW client-data, so it has to be fixed there.
|
|
This happened when the emote shortcut config has got too high ids
in it, i.e. when testing different client version on the same host.
Reviewed-by: Erik Schilling
|
|
The icon for #betsanc is still shown too high.
Reviewed-by: Ablu, Bertram
|
|
TODO: Update the date when actually releasing.
Reviewed-by: Bertram.
|
|
I think it also looks a bit more organized overall.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: jurkan.
|
|
Reviewed-by: Bertram.
|
|
SDL_ttf provides a separate function for getting the recommended line skip, or
the spacing between two lines of text. When rendering multiple lines of text
this should be used rather than the visual height of the font.
Since the information is only available for TrueTypeFont, a dynamic_cast was
used with a fallback on gcn::Font::getHeight.
Also made some small tweaks but nothing that really affects performance.
Reviewed-by: Yohann Ferreira
|
|
Spotted-by: cody.
Reviewed-by: bjorn.
|
|
Resolves: Mana-Mantis #457.
Reviewed-by: Bertram.
|
|
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Erik Schilling
|
|
- Fixed the player attacking when clicking on a monster,
and then walking near using the keyboard.
- Fixed the walking glitch seen in tile path mode by letting
the character reach its nearest tile path node.
Reviewed-by: Thorbjørn Lindeijer
|
|
The 'paths' configuration in client-data now overrides any configuration
in 'branding', so that it will apply after the updates for a certain
server have been downloaded.
Also, some isDirectory checks have been removed. When the configuration
is wrong, it's probably better to see that there is a problem.
Reviewed-by: Yohann Ferreira
|
|
The check whether a filename contains any '%' character was failing because
the 'unsigned int separator' was too small to hold std::string::npos.
Reviewed-by: Yohann Ferreira
|
|
Reviewed-by: Yohann Ferreira
|
|
Now announcements will only get displayed on the current tab + on the local tab
Reviewed-by: Thorbjørn Lindeijer
|
|
One pixel of the scroll bar wasn't visible since the mWidgetContainer
is shifted by one pixel by gcn::TabbedArea::adjustSize, which wasn't
being taken into account by our custom mWidgetContainer sizing code.
Fixed that by just letting Guichan handle it.
Another issue was that the tab scroll arrows were appearing before they
were needed, since they took into account their own size when checking
whether the tabs had enough space.
Finally, a Layout has a default padding of 6 pixels but this is a little
much for the chat window. I reduced it to 3 pixels now.
Reviewed-by: Erik Schilling
|
|
Ignore LocalPlayer::setDestination calls in this case, because it relies on the
tile size of the current map.
Reviewed-by: Erik Schilling
|
|
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
|
|
If the player switches login, then the password field in the
login window should be empty. This was not the case after
registering or password change.
Reviewed-by: Ablu, Bertram
|
|
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 first removed the keep attacking and pickup targetting unset
statements in the setdestination() function
since it was messing with all the rest of the logic,
and put those targetting logic where they belonged more.
I also changed the gotoTarget function to properly call the setTarget
function which permitted to properly unset the previous target
in that case.
I also finished the logic built around the mGoingToTarget member
(until then actually unused) to make it all work again.
At last, I also removed a now false comment
in the startWalking() function.
Reviewed-by: Erik Schilling
|
|
The direction is updated in those case only when the engine knows
it's the mouse requesting the destination.
Reviewed-by: Erik Schilling
|
|
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.
|
|
I also made the button not readjust its size when deleted
to avoid a crash.
Reviewed-by: Erik Schilling
|
|
Made the player's character look at where it is going
even when using the keyboard, by setting its direction
after getting the actual destination, and not before.
I also used the lookAt() function to avoid yet another
custom way of setting the direction.
Reviewed-by: Erik Schilling
|
|
The character used to stick to both corners of an obstacle it
encountered when walking diagonally.
Now it simply go back to the straight moving mode when
encountering an obstacle in one of the two direction used.
This also simplifies the function logic.
The character direction bug left is still there,
and will be dealt in a separate patch with.
Reviewed-by: Erik Schilling
|
|
It simply does the same thing, in better.
Reviewed-by: Erik Schilling
|
|
- I made the charCreatedialog handle a possible
max permitted color Id and a minimum hair style id for tA.
- Added a foundation to later load the styles and colors from
the same file, to handle the Mana-issue #224 for manaserv.
- Support for non-contiguous hair color and style ids
has also been added.
- I also replaced the < and > arrow signs with images.
Reviewed-by: Ben Longbons, Thorbjørn Lindeijer
|
|
The tA beingmanager was wrongly using the attack type
in the Being::handleAttack() function,
which is in fact used to set the attack id.
Thus, breaking the attack id given
and all its attack parameters.
I noticed that while updating the client data for TMW.
Reviewed-by: Thorbjørn Lindeijer
|
|
I also change the serverInfo to use a deque to permit
the use of the push_front function.
Spotted and reviewed-by: Erik Schilling
|
|
Reviewed-by: Erik Schilling
|
|
It is now listing possible source files lacking the copyright notice.
I also made the copyright notice text easily configurable.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Bjorn.
|
|
Makes it easier to see what was added during a conversation.
Reviewed-by: Yohann Ferreira
|
|
They are apparently no longer being used.
Reviewed-by: Erik Schilling
|
|
In my opinion, the code is clearer when using aggregation. For performance
it makes no difference.
This also fixes a memory leak in CompountSprite::clear, which forgot to
delete any existing sprites.
Reviewed-by: Erik Schilling
|
|
Really only the trade handler is concerned about whether the player is
currently in a trade or not.
Reviewed-by: Erik Schilling
|
|
Previously it was interfering with the 'switch character' functionality.
Reviewed-by: Erik Schilling
|
|
More cleanup can be done here, but these are the ones I read and
verified to not contain any valuable information anymore.
|
|
It's kind of hopeless trying to keep these files up-to-date, but
whatever.
|
|
A wrong (and duplicate) default entry for the 'onlineServerList' option
for branding files was causing it to malfunction. The problem only
showed up after the initialization of defaults was changed in commit
b856e8b47ab2dfd393e3c2720c5647eb66393931. Before that, branding config
file defaults were not being set when no branding file was used.
Reviewed-by: Yohann Ferreira
|
|
- Renamed mLastTarget to mLastTargetTime, and mLastAction to mLastActionTime
to clarify their use.
- NULL -> 0.
- Removed the unused mLocalWalkTime member.
+ Change requested by bjorn.
Reviewed-by: Thorjørn Lindeijer
|
|
Reviewed-by: Thorbjørn Lindeijer
|
|
|