Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
|
|
Members that are implemented inline are already inline, there is no need
to mark them as such.
Made two inline members of OpenGLGraphics private since because they are
marked as inline, they can't be used from other classes.
Reviewed-by: Erik Schilling
|
|
This happened when an NPC, monster or item couldn't be found and it had
to fall back on Being::Unknown. This instance was bugged since it had a
0 pointer in its sprites list, because when the Being::Unknown was
created, the SpriteDef::Empty was not initialized yet (since both were
global static variables, the initialization order was not well
defined).
Fixed it by removing SpriteDef::Empty and instead creating it in the
BeingInfo constructor. I've also changed the SpriteReference instances
to be inline values rather than instances on the heap, since they're
quite small. That also fixed a leak since those instances were never
getting deleted.
Reviewed-by: Yohann Ferreira
|
|
Use Mix_LoadMUS_RW to stream music files directly from PhysFS. I kept
around ResourceManager:copyFile for now, since it may have other uses.
Also cleaned up some initialization of configuration defaults.
Reviewed-by: Yohann Ferreira
|
|
Reviewed-by: Yohann Ferreira
|
|
This avoids the creation of a temporary buffer containing a complete
file for the sole purpose of wrapping it up in an SDL_RWops.
The necessary wrapper is by Ryan C. Gordon and is included in the
PhysFS repository under 'extras'.
Reviewed-by: Yohann Ferreira
|
|
This will ease the reading of the next patch about hair handling
at character creation time in tAthena.
As requested by bjorn.
Reviewed-by: bjorn
|
|
Conflicts:
src/actorsprite.cpp
|
|
|
|
When including a file that already is included the client won't try to load it
again and end in an endless loop but stops parsing and logs and warning.
Reviewed-by: bjorn.
|
|
All cases of documentation for non-existing parameters are now fixed.
Also marked a few getters as 'const', removed some superfluous 'inline'
keywords and removed the unused 'forceQuantity' option from
ItemContainer.
Reviewed-by: Yohann Ferreira
|
|
|
|
Now the death animation is set to the minimum of 1.5 seconds
just as in the older versions, but permit longer sequences
as well.
I didn't put a maximum hard cap on it as it may be a burden
for the maintainers whatever the hard cap would be,
and as it isn't vital to set one anyway.
Resolves: Mana-Mantis #364.
Reviewed-by: bjorn, Jaxad0127.
|
|
|
|
and added the default hit effects on it.
Reviewed-by: Jaxad0127.
|
|
Reviewed-by: Jaxad0127.
|
|
Resolves: Mana-Mantis #336.
Reviewed-by: Jaxad0127.
|
|
This required moving to C++0x, so it does that too, and fixes a few errors with
that.
Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
|
|
Just some stuff that piles up while "looking" at the code, which
eventually gets annoying to ignore while staging real changes.
* Replaced a few NULL occurrences with 0
* Rely on default parameter for std::vector::resize.
* Replaced a few "" with std::string()
* Prefer .empty() to == ""
* Removed a few comparisons with NULL
* Don't check pointers before deleting them
* Removed a bunch of redundant semicolons
* Made some global variables static (local to their compilation unit)
* Prefer prefix ++/-- operators to postfix versions when possible
* Corrected location of a comment
|
|
This is provided through the use of the 'effect-id' property
of the <attack> tag.
Note that the 'particle-effect' support has been removed
as it was redundant, but can be kept for backward compatibility.
Now, on both Manaserv and tA, only the attack id 1 is supported,
i.e:
<monster>
...
<attack id="1" effect-id="11" action="attack" />
</monster>
More to come with re-enabling of the attack type support.
I had to fix a crash in the Being::takeDamage() function
when there were no attacker (in Manaserv), and add rotation
support to the effectManager to achieve this.
Reviwed-by: Jaxad0127.
|
|
Reviewed-by: Yohann Ferreira
|
|
Conflicts:
CMakeLists.txt
po/fi.po
po/fr.po
src/gui/skilldialog.cpp
src/localplayer.cpp
src/net/manaserv/generalhandler.cpp
src/net/tmwa/buysellhandler.cpp
src/net/tmwa/generalhandler.cpp
src/net/tmwa/playerhandler.cpp
src/net/tmwa/specialhandler.cpp
src/winver.h
|
|
This patch adds support for the following two parameters
in weapon items:
hit-effect-id: Effect triggered on the victim on normal hit.
critical-hit-effect-id: Triggered on the victim on critical hit.
(Specified in effects.xml)
The patch also permits the use of custom defaults set in paths.xml
by setting the following keys:
(Paths are relative to the 'particles' key value, here.)
hitEffectId: defaulted to effect id 26.
criticalHitEffectId: defaulted to effect id 28.
Resolves: Mana-mantis #337.
Reviewed-by: bcs86
|
|
This avoids log warnings for missing weapon range.
Reviewed-by: thorbjorn, bcs86
|
|
Reviewed-by: Jaxad0127
|
|
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.
|
|
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
|