6edf86a4f9c954136a402657bd12ef6f1fb3ff6b
[supertux.git] / src / scripting / tilemap.cpp
1 //  $Id$
2 //
3 //  SuperTux
4 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
5 //
6 //  This program is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU General Public License
8 //  as published by the Free Software Foundation; either version 2
9 //  of the License, or (at your option) any later version.
10 //
11 //  This program is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 //  GNU General Public License for more details.
15 //
16 //  You should have received a copy of the GNU General Public License
17 //  along with this program; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
20 #include <config.h>
21
22 #include <string>
23 #include <stdio.h>
24 #include "object/tilemap.hpp"
25 #include "scripting/tilemap.hpp"
26 #include "math/vector.hpp"
27
28 #define NOIMPL      log_fatal << __PRETTY_FUNCTION__ << " not implemented."
29
30 namespace Scripting
31 {
32
33   TileMap::TileMap(::TileMap* tilemap)
34     : tilemap(tilemap)
35   { }
36
37   TileMap::~TileMap()
38   { }
39
40   void TileMap::goto_node(int node_no)
41   {
42     tilemap->goto_node(node_no);
43   }
44
45   void TileMap::start_moving()
46   {
47     tilemap->start_moving();
48   }
49
50   void TileMap::stop_moving()
51   {
52     tilemap->stop_moving();
53   }
54
55   void TileMap::fade(float alpha, float seconds)
56   {
57     tilemap->fade(alpha, seconds);
58   }
59
60   void TileMap::set_alpha(float alpha)
61   {
62     tilemap->set_alpha(alpha);
63   }
64
65   float TileMap::get_alpha()
66   {
67     return tilemap->get_alpha();
68   }
69
70 }