diff options
-rw-r--r-- | ChangeLog | 57 | ||||
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | data/icons/The Mana World.icns | bin | 0 -> 65136 bytes | |||
-rw-r--r-- | src/being.cpp | 13 | ||||
-rw-r--r-- | src/gui/chatinput.cpp | 4 | ||||
-rw-r--r-- | src/gui/chatinput.h | 6 | ||||
-rw-r--r-- | src/gui/gui.cpp | 4 | ||||
-rw-r--r-- | src/gui/setup_video.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/particle.cpp | 8 | ||||
-rw-r--r-- | src/particle.h | 3 | ||||
-rw-r--r-- | src/particleemitter.cpp | 12 |
12 files changed, 92 insertions, 21 deletions
@@ -1,10 +1,38 @@ -2007-06-30 Philipp Sehmisch <tmw@crushnet.org> +2007-07-07 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/gui/gui.cpp, src/gui/chatinput.h, src/gui/chatinput.cpp, + INSTALL: Ported to Guichan 0.7.0. Unfortunately, since Guichan 0.6.x + didn't have a FocusListener, compatibility with older versions is + broken. + +2007-06-30 Philipp Sehmisch <tmw@crushnet.org> * src/main.cpp: Changed include order to avoid a problem with guichan on windows. * src/net/beinghandler.cpp: Implemented getting the direction of attacks from the server. +2007-06-29 Philipp Sehmisch <tmw@crushnet.org> + + * src/particle.cpp, src/particleemitter.cpp: Corrected some perspective + issues of the particle engine and fixed a crash caused by particles + with child emitters that have an image than isn't used elsewhere. + * data/maps/new-3-1.tmx.gz: Added a particle effect at the spawn point + in Tulimshar. + +2007-06-21 Philipp Sehmisch <tmw@crushnet.org> + + * data/monsters.xml, data/graphics/sprites/monster-logmonster.png, + data/graphics/sprites/monster-logmonster.xml: Added logmonster by + Enigmatik (Monster ID is 23). + * data/items.xml, data/equipment.xml, + data/graphics/items/armor-chest-lightplatemail.png, + data/graphics/sprites/chest-lightplatemail-male.xml, + data/graphics/sprites/chest-lightplatemail-male.png, + data/graphics/sprites/chest-lightplatemail-female.png, + data/graphics/sprites/chest-lightplatemail-female.xml: + Added light platemail (see entry in items.xml for proposed specs). + 2007-06-16 Guillaume Melquiond <guillaume.melquiong@gmail.com> * src/resources/image.cpp: Set GL texture index to zero when an image @@ -14,6 +42,33 @@ * tmw.cbp: Updated Code::Blocks project file. +2007-06-13 Philipp Sehmisch <tmw@crushnet.org> + + * The Mana World.dev: Updated DevCpp project file. + +2007-06-13 Philipp Sehmisch <tmw@crushnet.org> + + * src/main.cpp: Added logging of version number. + +2007-06-12 David Athay <ko2fan@gmail.com> + + * data/icons/The Mana World.icns: Added Mac OSX icon. + +2007-06-11 Philipp Sehmisch <tmw@crushnet.org> + + * src/particle.h, src/being.cpp: Fixed a bug that prevented + being-controlled particles from being deleted (thanks to tuchs for + reporting). + +2007-06-06 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * data/items.xml: Fixed defense of silk headband. + +2007-06-04 Philipp Sehmisch <tmw@crushnet.org> + + * data/graphics/maps/new_17-1.tmx.gz: Changed the minimap image of the + lamp snake cave to the correct one. + 2007-06-03 David Athay <ko2fan@gmail.com> * src/main.cpp, src/game.cpp: Fixed screenshot taking on OSX. @@ -20,7 +20,7 @@ and some libraries. The required libraries are: * SDL_mixer http://www.libsdl.org/projects/SDL_mixer/ * SDL_image http://www.libsdl.org/projects/SDL_image/ * ENet 1.0 http://enet.bespin.org/ -* Guichan 0.6.x http://guichan.sourceforge.net/ +* Guichan 0.7.0 http://guichan.sourceforge.net/ * libxml2 http://www.xmlsoft.org/ * physfs 1.0.x http://icculus.org/physfs/ * zlib 1.2.x http://www.gzip.org/zlib/ diff --git a/data/icons/The Mana World.icns b/data/icons/The Mana World.icns Binary files differnew file mode 100644 index 00000000..7230a099 --- /dev/null +++ b/data/icons/The Mana World.icns diff --git a/src/being.cpp b/src/being.cpp index 7ba9ddb9..bdb27384 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -535,10 +535,19 @@ Being::logic() //Update particle effects for ( std::list<Particle *>::iterator i = mChildParticleEffects.begin(); - i != mChildParticleEffects.end(); - i++) + i != mChildParticleEffects.end(); + + ) { (*i)->setPosition((float)mPx + 16.0f, (float)mPy + 32.0f); + if (!(*i)->isAlive()) + { + (*i)->kill(); + i = mChildParticleEffects.erase(i); + } + else { + i++; + } } } diff --git a/src/gui/chatinput.cpp b/src/gui/chatinput.cpp index 2aa5a159..fc5d6aab 100644 --- a/src/gui/chatinput.cpp +++ b/src/gui/chatinput.cpp @@ -26,9 +26,11 @@ ChatInput::ChatInput() { setVisible(false); + + addFocusListener(this); } -void ChatInput::focusLost() +void ChatInput::focusLost(const gcn::Event &event) { setVisible(false); } diff --git a/src/gui/chatinput.h b/src/gui/chatinput.h index 59d0daf3..da2342ae 100644 --- a/src/gui/chatinput.h +++ b/src/gui/chatinput.h @@ -26,10 +26,12 @@ #include "textfield.h" +#include <guichan/focuslistener.hpp> + /** * The chat input hides when it loses focus. It is also invisible by default. */ -class ChatInput : public TextField +class ChatInput : public TextField, public gcn::FocusListener { public: /** @@ -41,7 +43,7 @@ class ChatInput : public TextField * Called if the chat input loses focus. It will set itself to * invisible as result. */ - void focusLost(); + void focusLost(const gcn::Event &event); }; #endif diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index fb7144a1..b9b15429 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -199,10 +199,6 @@ void Gui::logic() { gcn::Gui::logic(); - - // Work around Guichan bug of only applying focus on mouse or keyboard - // events. - mFocusHandler->applyChanges(); } void diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 8930af3e..cd1507a7 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -264,7 +264,7 @@ void Setup_Video::apply() } } } else { - new OkDialog("Switching to FullScreen", + new OkDialog("Switching to full screen", "Restart needed for changes to take effect."); } config.setValue("screen", fullscreen ? 1 : 0); diff --git a/src/main.cpp b/src/main.cpp index 3550c298..79ba49b4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -678,6 +678,8 @@ int main(int argc, char *argv[]) // Log the tmw version #ifdef PACKAGE_VERSION logger->log("The Mana World v%s", PACKAGE_VERSION); +#else + logger->log("The Mana World - version not defined"); #endif initXML(); diff --git a/src/particle.cpp b/src/particle.cpp index 509c20ee..805da102 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -39,6 +39,8 @@ #include "utils/fastsqrt.h" #include "utils/xml.h" +#define SIN45 0.707106781f + class Graphics; class Image; @@ -122,7 +124,7 @@ Particle::update() if (mTarget && mAcceleration != 0.0f) { - float distX = mPosX - mTarget->getPosX(); + float distX = (mPosX - mTarget->getPosX()) * SIN45; float distY = mPosY - mTarget->getPosY(); float distZ = mPosZ - mTarget->getPosZ(); float invHypotenuse; @@ -167,8 +169,8 @@ Particle::update() // Update position mPosX += mVectorX; - mPosY += mVectorY; - mPosZ += mVectorZ; + mPosY += mVectorY * SIN45; + mPosZ += mVectorZ * SIN45; // Update other stuff if (mLifetimeLeft > 0) diff --git a/src/particle.h b/src/particle.h index 7a747a5f..9e9223c7 100644 --- a/src/particle.h +++ b/src/particle.h @@ -243,6 +243,9 @@ class Particle : public Sprite void setDieDistance(float dist) { mInvDieDistance = 1.0f / dist; } + bool isAlive() + { return mAlive; } + /** * Manually marks the particle for deletion */ diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index 2387c652..5b5e86b9 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -76,10 +76,14 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map * {
mParticlePosY = readMinMax(propertyNode, 0.0f);
+ mParticlePosY.minVal *= SIN45;
+ mParticlePosY.maxVal *= SIN45;
}
else if (name == "position-z")
{
mParticlePosZ = readMinMax(propertyNode, 0.0f);
+ mParticlePosZ.minVal *= SIN45;
+ mParticlePosZ.maxVal *= SIN45;
}
else if (name == "image")
{
@@ -236,10 +240,6 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map * ParticleEmitter::~ParticleEmitter()
{
- if (mParticleImage)
- {
- mParticleImage->decRef();
- }
}
@@ -294,8 +294,8 @@ ParticleEmitter::createParticles() float power = mParticlePower.value();
newParticle->setVector(
cos(angleH) * cos(angleV) * power,
- sin(angleH) * cos(angleV) * SIN45 * power,
- sin(angleV) * SIN45 * power
+ sin(angleH) * cos(angleV) * power,
+ sin(angleV) * power
);
newParticle->setRandomnes(mParticleRandomnes.value());
|