22 #include <SDL2/SDL_opengl.h>
23 #include <SDL2/SDL_keycode.h>
24 #include <SDL2/SDL_scancode.h>
25 #include <SDL2/SDL_events.h>
26 #include <common_features/fader.h>
27 #include <common_features/rectf.h>
28 #include <script/lua_engine.h>
29 #include <scenes/_base/gfx_effect.h>
40 void updateTickValue();
54 Scene(TypeOfScene _type);
61 virtual void onMouseMoved(SDL_MouseMotionEvent &mmevent);
62 virtual void onMousePressed(SDL_MouseButtonEvent &mbevent);
63 virtual void onMouseReleased(SDL_MouseButtonEvent &mbevent);
64 virtual void onMouseWheel(SDL_MouseWheelEvent &wheelevent);
65 virtual void processEvents();
68 virtual void update();
69 virtual void updateLua();
70 virtual void render();
71 virtual void renderMouse();
75 void addRenderFunction(
const std::function<
void()>& renderFunc);
76 void clearRenderFunctions();
78 virtual bool isVizibleOnScreen(
PGE_RectF &rect);
79 virtual bool isVizibleOnScreen(
double x,
double y,
double w,
double h);
84 bool isOpacityFadding();
85 void setFade(
int speed,
float target,
float step);
90 typedef QList<Scene_Effect> SceneEffectsArray;
91 SceneEffectsArray WorkingEffects;
121 void processEffects(
float ticks);
124 QString errorString();
134 typedef std::chrono::high_resolution_clock StClock;
135 typedef std::chrono::high_resolution_clock::time_point StTimePt;
138 QString _errorString;
140 TypeOfScene sceneType;
143 QVector<std::function<void()> > renderFunctions;
Definition: gfx_effect.h:27
virtual void onKeyboardPressed(SDL_Scancode scancode)
Triggering when pressed any key on keyboard.
Definition: scene.cpp:69
void launchStaticEffect(long effectID, float startX, float startY, int animationLoops, int delay, float velocityX, float velocityY, float gravity, int direction=0, Scene_Effect_Phys phys=Scene_Effect_Phys())
launchStaticEffect Starts static effect by ID at position X,Y relative to left-top corner of effect p...
Definition: gfx_effect.cpp:107
virtual void onKeyboardReleasedSDL(SDL_Keycode sdl_key, Uint16 modifier)
Triggering when pressed any key on keyboard.
Definition: scene.cpp:78
This class should have basic functions for interacting with lua To run the lua engine you have to con...
Definition: lua_engine.h:27
void launchStaticEffectC(long effectID, float startX, float startY, int animationLoops, int delay, float velocityX, float velocityY, float gravity, int direction=0, Scene_Effect_Phys phys=Scene_Effect_Phys())
launchStaticEffectC Starts static effect by ID at position X,Y relative to center of effect picture ...
Definition: gfx_effect.cpp:25
virtual void onKeyboardReleased(SDL_Scancode scancode)
Triggering when pressed any key on keyboard.
Definition: scene.cpp:75
virtual void onKeyInput(int key)
Triggering when pressed game specific key.
Definition: scene.cpp:66
virtual void onKeyboardPressedSDL(SDL_Keycode sdl_key, Uint16 modifier)
Triggering when pressed any key on keyboard.
Definition: scene.cpp:72