1 //  SuperTux
2 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
3 //
4 //  This program is free software: you can redistribute it and/or modify
5 //  it under the terms of the GNU General Public License as published by
6 //  the Free Software Foundation, either version 3 of the License, or
7 //  (at your option) any later version.
8 //
9 //  This program is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 //  GNU General Public License for more details.
13 //
14 //  You should have received a copy of the GNU General Public License
15 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 
17 #include "object/tilemap.hpp"
18 #include "scripting/tilemap.hpp"
19 
20 namespace scripting {
21 
22 void
goto_node(int node_no)23 TileMap::goto_node(int node_no)
24 {
25   SCRIPT_GUARD_VOID;
26   object.goto_node(node_no);
27 }
28 
29 void
start_moving()30 TileMap::start_moving()
31 {
32   SCRIPT_GUARD_VOID;
33   object.start_moving();
34 }
35 
36 void
stop_moving()37 TileMap::stop_moving()
38 {
39   SCRIPT_GUARD_VOID;
40   object.stop_moving();
41 }
42 
43 int
get_tile_id(int x,int y) const44 TileMap::get_tile_id(int x, int y) const
45 {
46   SCRIPT_GUARD_DEFAULT;
47   return object.get_tile_id(x, y);
48 }
49 
50 int
get_tile_id_at(float x,float y) const51 TileMap::get_tile_id_at(float x, float y) const
52 {
53   SCRIPT_GUARD_DEFAULT;
54   return object.get_tile_id_at( Vector(x, y) );
55 }
56 
57 void
change(int x,int y,int newtile)58 TileMap::change(int x, int y, int newtile)
59 {
60   SCRIPT_GUARD_VOID;
61   object.change(x, y, newtile);
62 }
63 
64 void
change_at(float x,float y,int newtile)65 TileMap::change_at(float x, float y, int newtile)
66 {
67   SCRIPT_GUARD_VOID;
68   object.change_at(Vector(x, y), newtile);
69 }
70 
71 void
fade(float alpha,float seconds)72 TileMap::fade(float alpha, float seconds)
73 {
74   SCRIPT_GUARD_VOID;
75   object.fade(alpha, seconds);
76 }
77 
78 void
tint_fade(float seconds,float red,float green,float blue,float alpha)79 TileMap::tint_fade(float seconds, float red, float green, float blue, float alpha)
80 {
81   SCRIPT_GUARD_VOID;
82   object.tint_fade(Color(red, green, blue, alpha), seconds);
83 }
84 
85 void
set_alpha(float alpha)86 TileMap::set_alpha(float alpha)
87 {
88   SCRIPT_GUARD_VOID;
89   object.set_alpha(alpha);
90 }
91 
92 float
get_alpha() const93 TileMap::get_alpha() const
94 {
95   SCRIPT_GUARD_DEFAULT;
96   return object.get_alpha();
97 }
98 
99 void
set_solid(bool solid)100 TileMap::set_solid(bool solid)
101 {
102   SCRIPT_GUARD_VOID;
103   object.set_solid(solid);
104 }
105 
106 } // namespace scripting
107 
108 /* EOF */
109