X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fscripted_object.cpp;h=56a1fd5da8ab784b98cebb39c9fff63d0a494ae8;hb=78ac7aef674f518549f96160c6354b589553f952;hp=13e5f5f7594a4a730f6a61039c1866dde3196856;hpb=058e2f6298d8319c0fe03c5e950a36a8f1f57aba;p=supertux.git diff --git a/src/object/scripted_object.cpp b/src/object/scripted_object.cpp index 13e5f5f75..56a1fd5da 100644 --- a/src/object/scripted_object.cpp +++ b/src/object/scripted_object.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // 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 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 @@ -14,24 +12,26 @@ // 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 +// along with this program. If not, see . + +#include "object/scripted_object.hpp" -#include -#include +#include -#include "scripted_object.hpp" -#include "video/drawing_context.hpp" #include "scripting/squirrel_util.hpp" -#include "resources.hpp" -#include "object_factory.hpp" -#include "math/vector.hpp" #include "sprite/sprite.hpp" - -ScriptedObject::ScriptedObject(const lisp::Lisp& lisp) - : MovingSprite(lisp, LAYER_OBJECTS, COLGROUP_MOVING_STATIC), - solid(true), physic_enabled(true), visible(true), new_vel_set(false) +#include "supertux/object_factory.hpp" +#include "util/reader.hpp" + +ScriptedObject::ScriptedObject(const Reader& lisp) : + MovingSprite(lisp, LAYER_OBJECTS, COLGROUP_MOVING_STATIC), + physic(), + name(), + solid(true), + physic_enabled(true), + visible(true), + new_vel_set(false), + new_vel() { lisp.get("name", name); if(name == "") @@ -143,7 +143,6 @@ ScriptedObject::is_solid() return solid; } - void ScriptedObject::set_action(const std::string& animation) { @@ -209,3 +208,5 @@ ScriptedObject::collision(GameObject& , const CollisionHit& ) } IMPLEMENT_FACTORY(ScriptedObject, "scriptedobject"); + +/* EOF */