From 9baedc27191c82bbf1fedee2a7e738bc5b267c0e Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 2 May 2010 14:43:40 -0600 Subject: Add support for floor item sprites This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite; CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common functionailty into new base classes which will make other Mantis tickets easier to do. Also allows monsters to use particle effects. Reviewed-by: Bertram --- src/actor.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/actor.h') diff --git a/src/actor.h b/src/actor.h index 59e29b88..367bcd75 100644 --- a/src/actor.h +++ b/src/actor.h @@ -46,7 +46,7 @@ public: * would support setting a translation offset. It already does this * partly with the clipping rectangle support. */ - virtual void draw(Graphics *graphics, int offsetX, int offsetY) const = 0; + virtual bool draw(Graphics *graphics, int offsetX, int offsetY) const = 0; /** * Returns the horizontal size of the actors graphical representation @@ -105,14 +105,12 @@ public: /** * Returns the current alpha value used to draw the actor. */ - virtual float getAlpha() const - { return mAlpha; } + virtual float getAlpha() const = 0; /** * Sets the alpha value used to draw the actor. */ - virtual void setAlpha(float alpha) - { mAlpha = alpha; } + virtual void setAlpha(float alpha) = 0; void setMap(Map *map); @@ -122,7 +120,6 @@ public: protected: Map *mMap; Vector mPos; /**< Position in pixels relative to map. */ - float mAlpha; private: Actors::iterator mMapActor; -- cgit v1.2.3-70-g09d2