Renamed namespaces to all lowercase
[supertux.git] / src / scripting / tilemap.hpp
index c4750c2..fc6d972 100644 (file)
@@ -1,12 +1,10 @@
-//  $Id: tilemap.hpp 4063 2006-07-21 21:05:23Z anmaster $
-//
 //  SuperTux
 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
-//  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
 //  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 <http://www.gnu.org/licenses/>.
 
-#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 */