/* $Id: hook.hpp,v 1.10.4.1 2006/01/20 11:33:52 chfreund Exp $ */ #ifndef _HOOK_HPP_ #define _HOOK_HPP_ /**********************************************************/ #include #include "global.hpp" #include "constants.hpp" #include "collidableobject.hpp" #include "audio.hpp" /**********************************************************/ class Avatar; /**********************************************************/ class Hook : public CollidableObject { friend class WeaponHook; public: Hook(); bool initialize( const Vector& pos, const Vector& vel, CollidableObject*& hitObject ); virtual Sint32 getID() const { return HOOK; } virtual bool testGrounded( void ); virtual void update( void ); virtual bool collidedWithObstacle( const Sint32 colX, const Sint32 colY ); virtual int applyDamage( const Particles::ParticleData& p ); virtual void serialize( Uint8*& bufferPointer ) const; virtual void deserialize( Uint8*& bufferPointer ); virtual Uint32 getSerializeBufferSize( void ) const; virtual void dump( std::ostream& out ) const; protected: static Mix_Chunk* m_attachSample, * m_damageSample; Sint32 m_stickingAtX, m_stickingAtY; bool m_firstEarthContact; }; /**********************************************************/ #endif /* _HOOK_HPP_ */