17 #ifndef HEADER_SUPERTUX_OBJECT_DISPLAY_EFFECT_HPP 18 #define HEADER_SUPERTUX_OBJECT_DISPLAY_EFFECT_HPP 20 #include "supertux/game_object.hpp" 32 static void register_class(ssq::VM& vm);
39 virtual void update(
float dt_sec)
override;
43 virtual std::string get_exposed_class_name()
const override {
return "DisplayEffect"; }
91 NO_FADE, FADE_IN, FADE_OUT
96 float screen_fadetime;
99 float border_fadetime;
void fade_in(float time)
Gradually fades in the screen from black for the next ""time"" seconds.
Definition: display_effect.cpp:147
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: display_effect.hpp:37
void set_black(bool black)
Blackens or un-blackens the screen (depending on the value of ""black"").
Definition: display_effect.cpp:156
void four_to_three(float time)
Sets the display ratio to 4:3, removing the black bars added by ""sixteen_to_nine()"".
Definition: display_effect.cpp:183
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: display_effect.cpp:93
virtual bool is_singleton() const override
If true only a single object of this type is allowed in a given GameObjectManager.
Definition: display_effect.hpp:41
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: display_effect.cpp:46
""DisplayEffect"" is an interface for toying with the display.
Definition: display_effect.hpp:29
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
void sixteen_to_nine(float time)
Sets the display ratio to 16:9, effectively adding black bars at the top and bottom of the screen...
Definition: display_effect.cpp:168
bool is_black() const
Returns ""true"" if the screen has been blackened by ""set_black"".
Definition: display_effect.cpp:162
virtual GameObjectClasses get_class_types() const
List notable classes in inheritance hierarchy of class.
Definition: game_object.cpp:113
A helper structure to list all the type_indexes of the classes in the type hierarchy of a given class...
Definition: game_object.hpp:57
virtual bool is_saveable() const override
Indicates if the object will be saved.
Definition: display_effect.hpp:42
void fade_out(float time)
Gradually fades out the screen to black for the next ""time"" seconds.
Definition: display_effect.cpp:138
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42