summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--NEWS3
-rw-r--r--src/player.cpp16
3 files changed, 25 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b36139d..6f61952c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * configure.ac, The Mana World.dev, CMakeLists.txt,
+ data/help/header.txt, NEWS: Set version to 0.0.21.1.
+ * src/player.cpp: Fixed excessive unnecessary reloading of sprites.
+
2006-10-28 Björn Steinbrink <B.Steinbrink@gmx.de>
* src/main.c: Reload wallpaper after updates are fetched.
@@ -5,7 +11,7 @@
2006-10-28 Philipp Sehmisch <tmw@crushnet.org>
- * data/graphics/sprites/monster20.png,
+ * data/graphics/sprites/monster20.png,
data/graphics/sprites/monster20.xml,
data/graphics/sprites/CMakeLists.txt:
Added pumpkin ghost monster for halloween event.
@@ -15,7 +21,7 @@
2006-10-24 Philipp Sehmisch <tmw@crushnet.org>
- * data/graphics/images/ambient/night.png: added graphic for night
+ * data/graphics/images/ambient/night.png: added graphic for night
ambient effect.
2006-10-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
@@ -79,7 +85,7 @@
2006-10-12 Cédric Borgese <cedric.borgese@gmail.com>
- * data/graphics/tiles/Woodland_x3.png : Enlarge the trunk and the
+ * data/graphics/tiles/Woodland_x3.png: Enlarge the trunk and the
base of the trees in the woodland tileset.
2006-10-09 Yohann Ferreira <bertram@cegetel.net>
@@ -145,7 +151,6 @@
* data/graphics/maps/new_2-1.tmx.gz: Matt Howe fixed up cave map.
->>>>>>> .r2727
2006-09-26 Eugenio Favalli <elvenprogrammer@gmail.com>
* data/graphics/maps/new_6-1.tmx.gz: Alderan fixed a map issue.
@@ -231,10 +236,9 @@
2006-09-16 Philipp Sehmisch <tmw@crushnet.org>
- * src/animatedsprite.cpp, src/animatedsprite.h:
- Fixed the crash when attacking without a weapon, some additional stability
- improvements and more descriptive variable names in the parsing
- algorithmn.
+ * src/animatedsprite.cpp, src/animatedsprite.h: Fixed the crash when
+ attacking without a weapon, some additional stability improvements and
+ more descriptive variable names in the parsing algorithmn.
2006-09-16 Eugenio Favalli <elvenprogrammer@gmail.com>
diff --git a/NEWS b/NEWS
index aa367062..55d3b272 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
0.0.21.1 (.. October 2006)
- Reload wallpaper after loading updates
- Added support for gzip compressed map layer data
+- Added support for building with CMake
+- Added slider to setup dialog for configuring overlay effect
+- Fixed excessive unnecessary reloading of sprites
- Fixed problem with OpenGL related redefinition
- Fixed problems with hiding windows using h
- Fixed trade window positioning
diff --git a/src/player.cpp b/src/player.cpp
index 1658840a..0ba99fe7 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -108,12 +108,12 @@ Player::setHairColor(Uint16 color)
{
if (color != mHairColor && mHairStyle > 0)
{
- delete mSprites[HAIR_SPRITE];
AnimatedSprite *newHairSprite = new AnimatedSprite(
"graphics/sprites/hairstyle" + toString(mHairStyle) + ".xml",
color - 1);
newHairSprite->setDirection(getSpriteDirection());
+ delete mSprites[HAIR_SPRITE];
mSprites[HAIR_SPRITE] = newHairSprite;
resetAnimations();
@@ -128,12 +128,12 @@ Player::setHairStyle(Uint16 style)
{
if (style != mHairStyle && mHairColor > 0)
{
- delete mSprites[HAIR_SPRITE];
AnimatedSprite *newHairSprite = new AnimatedSprite(
"graphics/sprites/hairstyle" + toString(style) + ".xml",
mHairColor - 1);
newHairSprite->setDirection(getSpriteDirection());
+ delete mSprites[HAIR_SPRITE];
mSprites[HAIR_SPRITE] = newHairSprite;
resetAnimations();
@@ -160,11 +160,14 @@ Player::setVisibleEquipment(Uint8 slot, Uint8 id)
break;
}
- delete mSprites[position];
- mSprites[position] = NULL;
-
// id = 0 means unequip
- if (id) {
+ if (id == 0)
+ {
+ delete mSprites[position];
+ mSprites[position] = NULL;
+ }
+ else
+ {
char stringId[4];
sprintf(stringId, "%03i", id);
@@ -172,6 +175,7 @@ Player::setVisibleEquipment(Uint8 slot, Uint8 id)
"graphics/sprites/item" + toString(stringId) + ".xml", 0);
equipmentSprite->setDirection(getSpriteDirection());
+ delete mSprites[position];
mSprites[position] = equipmentSprite;
resetAnimations();