From: Christoph Sommer Date: Tue, 8 Aug 2006 18:12:53 +0000 (+0000) Subject: Forgot new files X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=af80526c23594adb4db5a34715138a8d41364559;p=supertux.git Forgot new files SVN-Revision: 4131 --- diff --git a/src/scripting/tilemap.cpp b/src/scripting/tilemap.cpp new file mode 100644 index 000000000..632161949 --- /dev/null +++ b/src/scripting/tilemap.cpp @@ -0,0 +1,55 @@ +// $Id: tilemap.cpp 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 distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// 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. + +#include + +#include +#include +#include "object/tilemap.hpp" +#include "scripting/tilemap.hpp" +#include "math/vector.hpp" + +#define NOIMPL log_fatal << __PRETTY_FUNCTION__ << " not implemented." + +namespace Scripting +{ + + TileMap::TileMap(::TileMap* tilemap) + : tilemap(tilemap) + { } + + TileMap::~TileMap() + { } + + void TileMap::goto_node(int node_no) + { + tilemap->goto_node(node_no); + } + + void TileMap::start_moving() + { + tilemap->start_moving(); + } + + void TileMap::stop_moving() + { + tilemap->stop_moving(); + } + +} diff --git a/src/scripting/tilemap.hpp b/src/scripting/tilemap.hpp new file mode 100644 index 000000000..c4750c277 --- /dev/null +++ b/src/scripting/tilemap.hpp @@ -0,0 +1,55 @@ +// $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 distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// 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. + +#ifndef __SCRIPTING_TILEMAP_H__ +#define __SCRIPTING_TILEMAP_H__ + +#ifndef SCRIPTING_API +class TileMap; +typedef TileMap _TileMap; +#endif + +namespace Scripting +{ + +class TileMap +{ +public: +#ifndef SCRIPTING_API + TileMap(_TileMap* tilemap); + ~TileMap(); +#endif + + /** Move tilemap until at given node, then stop */ + void goto_node(int node_no); + + /** Start moving tilemap */ + void start_moving(); + + /** Stop tilemap at next node */ + void stop_moving(); + +#ifndef SCRIPTING_API + _TileMap* tilemap; +#endif +}; + +} + +#endif