Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
This merge reverts change 3b22c2cf170c877904dcef5a4af03ac360bd0581.
Conflicts:
src/gui/charcreatedialog.cpp
src/net/manaserv/manaserv_protocol.h
|
|
Mana-mantis: #506.
|
|
|
|
This file was introduced by ManaPlus as a way of configuring the
character creation process. It defines the number of hair styles
and colors, how stat points should be divided and what the starting
equipment of the player is.
The minimum and maximum hair color/style IDs are not supported at
the moment.
This is mostly a backport of ManaPlus commits 10cf52b5 and dcc18eba,
with some style changes.
Mantis-issue: 501
Reviewed-by: Ablu
|
|
This way it can also be used when connecting to a tmwAthena server for
customizing the min/max of attributes and the amount of starting points.
Mantis-issue: 501
Reviewed-by: Ablu
|
|
Tested-by: Frost.
|
|
Tested-by: Frost.
|
|
They allowed using gcn::Image, which in turns allows using gcn::Icon
and gcn::ImageFont, but none of this is actually used anymore.
Reviewed-by: Erik Schilling
|
|
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
|
|
When uploading an SDL surface to an OpenGL texture, it was always making
a copy that had the desired size and pixel format. Now this copy is no
longer being made when the existing surface already has the target size
and pixel format.
In fact most images are already in 32-bit RGBA format after loading them.
Reviewed-by: Erik Schilling
|
|
While simply specifying "4 components" works, it is preferred to specify
the actual image format like GL_RGBA8 in our case.
http://www.opengl.org/wiki/Common_Mistakes#Image_precision
Reviewed-by: Erik Schilling
|
|
If the graphics driver supports this, there is no need to create
textures with power-of-two dimensions. It is then also preferred to use
regular textures than relying on the older GL_ARB_texture_rectangle
extension.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Stefan Beller
|
|
Hacked Graphics::drawRescaledImage a bit to make it work...
|
|
|
|
|
|
They allowed using gcn::Image, which in turns allows using gcn::Icon
and gcn::ImageFont, but none of this is actually used anymore.
|
|
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.
|
|
This reverts commit 137ade7226af37d073a5755b90181275664dd65c.
Turns out that when leaving the default values, the textures won't
actually work since they are incomplete unless the mipmaps are generated
(since GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR by default).
For now we don't want to generate mipmaps anyway since we're going for a
pixely look, so revert the filters back to GL_NEAREST.
The reason this had worked for me is because on my system the texture
type GL_TEXTURE_RECTANGLE_ARB is used instead of GL_TEXTURE_2D and this
texture type does not support mipmaps.
|
|
When uploading an SDL surface to an OpenGL texture, it was always making
a copy that had the desired size and pixel format. Now this copy is no
longer being made when the existing surface already has the target size
and pixel format.
In fact most images are already in 32-bit RGBA format after loading them.
|
|
While simply specifying "4 components" works, it is preferred to specify
the actual image format like GL_RGBA8 in our case.
http://www.opengl.org/wiki/Common_Mistakes#Image_precision
|
|
If the graphics driver supports this, there is no need to create
textures with power-of-two dimensions. It is then also preferred to use
regular textures than relying on the older GL_ARB_texture_rectangle
extension.
|
|
|
|
This reverts commit 137ade7226af37d073a5755b90181275664dd65c.
Turns out that when leaving the default values, the textures won't
actually work since they are incomplete unless the mipmaps are generated
(since GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR by default).
For now we don't want to generate mipmaps anyway since we're going for a
pixely look, so revert the filters back to GL_NEAREST.
The reason this had worked for me is because on my system the texture
type GL_TEXTURE_RECTANGLE_ARB is used instead of GL_TEXTURE_2D and this
texture type does not support mipmaps.
|
|
The screen will be scaled up as much as possible, while keeping a
minimum 'virtual' resolution of 640x360.
|
|
Reviewed-by: bjorn.
|
|
|
|
Also, since GCC 4.7 there is a binary compatibility issue when linking with a
Guichan that was not compiled in C++11 mode. This commit also allows compiling
with GCC 4.7 with C++11 mode turned off.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: bjorn.
|
|
|
|
The tmwa/BeingHandler was adjusting the effect id rather than the emote
id, causing it to not find the last emote (and the rest of the emotes
only worked correctly because the effect ids were consecutive in the same
order as the emote ids).
Furthermore, the EmoteShortcutContainer refused to draw the icon for the
last emote due to an off-by-one error in dealing with the 1-adjusted
emote ids used by the EmoteShortcut class.
Also cleaned up some old remains of a player ignore strategy that used
to use the two balloon emotes (this had been their original purpose).
Reviewed-by: Erik Schilling
|
|
|
|
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
|
|
Mix_LoadMUS_RW was added with SDL_mixer 1.2.9.
Reviewed-by: Erik Schilling
|
|
One of the sound channels is reserved for notification sounds, of which the
volume can be configured separately. Currently, the only notification sound
that is played is for receiving whispers. That can be extended later.
The newmessage.ogg sound used currently is the one for receiving a message
with the Psi instant messenger.
Parts of this patch are based on the new message notification in ManaPlus.
Reviewed-by: Erik Schilling
|
|
The scaled wallpaper looks quite a bit better when linear texture
smoothing is applied, and I could not measure a significant difference
in framerate from setting the texture filter to GL_NEAREST. Hence it
seems not necessary to me to introduce the smoothing as an option.
The default value for GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR
and the default for GL_TEXTURE_MAG_FILTER is GL_LINEAR. These make sure
that the texture is reasonably smoothed by using the weighted average of
the nearest four pixels.
Reviewed-by: Erik Schilling
|
|
Now it searches for the smallest wallpaper that is at least as large as
the screen, since downscaling is preferred to upscaling. When not found,
it will go with the largest available wallpaper.
Previously, the algorithm preferred upscaling, but didn't bother
searching for the largest available one, but would pick a random image.
It would also revert to the default Mana wallpaper when no image was
small enough to fit on the screen.
Reviewed-by: Erik Schilling
Reviewed-by: Yohann Ferreira
|
|
+ Fixed disabling of use button when possible
Reviewed-by: bjorn.
|
|
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
|
|
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
|
|
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 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
|
|
Reviewed-by: Erik Schilling
|
|
Reviewed-by: Bjorn.
|