X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fscripting%2Ftilemap.hpp;h=fc6d972ee853364d85562cd943b7eb4b837c5c05;hb=127a53d73c5dff3fac5b10ff3f1dd087938d8c7f;hp=c4750c27748e00a4b3ad440d05e8c1a37e729c86;hpb=af80526c23594adb4db5a34715138a8d41364559;p=supertux.git diff --git a/src/scripting/tilemap.hpp b/src/scripting/tilemap.hpp index c4750c277..fc6d972ee 100644 --- a/src/scripting/tilemap.hpp +++ b/src/scripting/tilemap.hpp @@ -1,12 +1,10 @@ -// $Id: tilemap.hpp 4063 2006-07-21 21:05:23Z anmaster $ -// // 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 */