X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworldmap%2Fsprite_change.hpp;h=4754e279fe8650b8134d382ce60ae312ac79870d;hb=8b8e1c3576cedddb1d88eafa5fd4804e8257793c;hp=a597f7a0ee0e165641f309dace4778885525a6ac;hpb=fc73efa7ff699fe3c9c237845b6f4fda0d999862;p=supertux.git diff --git a/src/worldmap/sprite_change.hpp b/src/worldmap/sprite_change.hpp index a597f7a0e..4754e279f 100644 --- a/src/worldmap/sprite_change.hpp +++ b/src/worldmap/sprite_change.hpp @@ -1,8 +1,7 @@ -// $Id: worldmap.hpp 3327 2006-04-13 15:02:40Z ravu_al_hemio $ +// $Id$ // // SuperTux -// Copyright (C) 2004 Ingo Ruhnke -// Copyright (C) 2006 Christoph Sommer +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -22,6 +21,7 @@ #include #include +#include #include "game_object.hpp" #include "lisp/lisp.hpp" #include "math/vector.hpp" @@ -51,16 +51,36 @@ public: * another SpriteChange object. */ std::string stay_action; + /** - * should the stayaction be displayed + * name of a group in which only one SpriteChange will ever have its stay_action displayed. + * Leave empty if you don't care. */ - bool in_stay_action; + std::string stay_group; virtual void draw(DrawingContext& context); virtual void update(float elapsed_time); + + /** + * Activates the SpriteChange's stay action, if applicable + */ + void set_stay_action(); + + /** + * Deactivates the SpriteChange's stay action, if applicable + */ + void clear_stay_action(); + +private: + /** + * should the stayaction be displayed + */ + bool in_stay_action; + + static std::list all_sprite_changes; + }; } #endif -