X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Ftilemap.hpp;h=fc6d972ee853364d85562cd943b7eb4b837c5c05;hb=f5ad6f69da56235de950f21de30563802c6f2e06;hp=5b2e3cd25b95d5cae96edf51f049e8917bdb22be;hpb=68ed4e94bda50566616c21031c3beb48499a7f7c;p=supertux.git diff --git a/src/scripting/tilemap.hpp b/src/scripting/tilemap.hpp index 5b2e3cd25..fc6d972ee 100644 --- a/src/scripting/tilemap.hpp +++ b/src/scripting/tilemap.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux // 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 -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,19 +12,17 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// along with this program. If not, see . -#ifndef __SCRIPTING_TILEMAP_H__ -#define __SCRIPTING_TILEMAP_H__ +#ifndef HEADER_SUPERTUX_SCRIPTING_TILEMAP_HPP +#define HEADER_SUPERTUX_SCRIPTING_TILEMAP_HPP #ifndef SCRIPTING_API class TileMap; typedef TileMap _TileMap; #endif -namespace Scripting -{ +namespace scripting { class TileMap { @@ -45,11 +41,33 @@ public: /** Stop tilemap at next node */ void stop_moving(); + /** + * Start fading the tilemap to opacity given by @c alpha. + * Destination opacity will be reached after @c seconds seconds. Also influences solidity. + */ + void fade(float alpha, float seconds); + + /** + * Instantly switch tilemap's opacity to @c alpha. Also influences solidity. + */ + void set_alpha(float alpha); + + /** + * Return tilemap's opacity. Note that while the tilemap is fading in or out, this will return the current alpha value, not the target alpha. + */ + float get_alpha(); + #ifndef SCRIPTING_API _TileMap* tilemap; + +private: + TileMap(const TileMap&); + TileMap& operator=(const TileMap&); #endif }; } #endif + +/* EOF */