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
20namespace scripting {
21
22void
23TileMap::goto_node(int node_no)
24{
25 SCRIPT_GUARD_VOID;
26 object.goto_node(node_no);
27}
28
29void
30TileMap::start_moving()
31{
32 SCRIPT_GUARD_VOID;
33 object.start_moving();
34}
35
36void
37TileMap::stop_moving()
38{
39 SCRIPT_GUARD_VOID;
40 object.stop_moving();
41}
42
43int
44TileMap::get_tile_id(int x, int y) const
45{
46 SCRIPT_GUARD_DEFAULT;
47 return object.get_tile_id(x, y);
48}
49
50int
51TileMap::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
57void
58TileMap::change(int x, int y, int newtile)
59{
60 SCRIPT_GUARD_VOID;
61 object.change(x, y, newtile);
62}
63
64void
65TileMap::change_at(float x, float y, int newtile)
66{
67 SCRIPT_GUARD_VOID;
68 object.change_at(Vector(x, y), newtile);
69}
70
71void
72TileMap::fade(float alpha, float seconds)
73{
74 SCRIPT_GUARD_VOID;
75 object.fade(alpha, seconds);
76}
77
78void
79TileMap::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
85void
86TileMap::set_alpha(float alpha)
87{
88 SCRIPT_GUARD_VOID;
89 object.set_alpha(alpha);
90}
91
92float
93TileMap::get_alpha() const
94{
95 SCRIPT_GUARD_DEFAULT;
96 return object.get_alpha();
97}
98
99void
100TileMap::set_solid(bool solid)
101{
102 SCRIPT_GUARD_VOID;
103 object.set_solid(solid);
104}
105
106} // namespace scripting
107
108/* EOF */
109