X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fdisplay_effect.hpp;h=8c3f8572e4e09ff55cc98ea0c264f29d42ed7a7e;hb=555d1b7bebb45326d82d934e07463209837309b0;hp=f35dd528e036d4621fb6471619d0b3cf2da16ba6;hpb=071c31e7fcf8bfbd00ec8d7d19313d7f6e433885;p=supertux.git diff --git a/src/object/display_effect.hpp b/src/object/display_effect.hpp index f35dd528e..8c3f8572e 100644 --- a/src/object/display_effect.hpp +++ b/src/object/display_effect.hpp @@ -1,35 +1,73 @@ +// $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 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 __OBJECT_DISPLAY_EFFECT_H__ #define __OBJECT_DISPLAY_EFFECT_H__ #include "scripting/display_effect.hpp" #include "game_object.hpp" +#include "script_interface.hpp" -class DisplayEffect : public GameObject, public Scripting::DisplayEffect +class DisplayEffect : public GameObject, public Scripting::DisplayEffect, + public ScriptInterface { public: - DisplayEffect(); + DisplayEffect(std::string name = ""); virtual ~DisplayEffect(); + void expose(HSQUIRRELVM vm, SQInteger table_idx); + void unexpose(HSQUIRRELVM vm, SQInteger table_idx); + void update(float elapsed_time); void draw(DrawingContext& context); + + /** + * @name Scriptable Methods + * @{ + */ + void fade_out(float fadetime); void fade_in(float fadetime); void set_black(bool enabled); bool is_black(); - void sixteen_to_nine(); - void four_to_three(); + void sixteen_to_nine(float fadetime); + void four_to_three(float fadetime); + + /** + * @} + */ private: enum FadeType { NO_FADE, FADE_IN, FADE_OUT }; - FadeType type; - float fadetime; - float fading; + FadeType screen_fade; + float screen_fadetime; + float screen_fading; + FadeType border_fade; + float border_fadetime; + float border_fading; + float border_size; + bool black; - bool cutscene_borders; + bool borders; }; #endif -