|
Capycore Engine
0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
|
SDL-based implementation of the backend system interface. More...
#include <sdl_backend_system.h>
Public Member Functions | |
| SDLBackendSystem ()=default | |
| void | initialize_listeners (std::unordered_map< SystemEvent, std::vector< BackendCallback > > *listeners) override |
| void | poll_events () override |
| Polls for new events from the backend system. | |
| void | init_frame_timer () override |
| Initializes the internal timer for frame time calculation. | |
| void | update_frame_time (float time_scale) override |
| Updates the frame time based on the elapsed time since the last frame. | |
| float | delta_time () const override |
| Retrieves the time elapsed since the last frame. | |
| float | frames_per_second () const override |
| Retrieves the frames per second (FPS) based on the updated frame time. | |
| std::string | get_clipboard_text () override |
| Gets the current text from the system clipboard. | |
| void | set_cursor_to_arrow () override |
| Sets the cursor to the standard arrow shape. | |
| void | set_cursor_to_hand () override |
| Sets the cursor to the hand shape. | |
| void | set_cursor_to_ibeam () override |
| Sets the cursor to the I-beam shape. | |
| void | set_cursor_to_crosshair () override |
| Sets the cursor to the crosshair shape. | |
| void | set_cursor_to_wait () override |
| Sets the cursor to the wait (hourglass) shape. | |
Public Member Functions inherited from IBackendSystem | |
| virtual | ~IBackendSystem ()=default |
Additional Inherited Members | |
Protected Attributes inherited from IBackendSystem | |
| uint64_t | last_ {0} |
| double | freq_ {0.0f} |
| float | delta_time_ {0.0f} |
| int | frame_count_ {0} |
| float | fps_ {0.0f} |
| float | accumulated_time_ {0.0f} |
SDL-based implementation of the backend system interface.
Handles event polling and frame timing using SDL functions.
|
default |
|
overridevirtual |
Retrieves the time elapsed since the last frame.
Implements IBackendSystem.
|
overridevirtual |
Retrieves the frames per second (FPS) based on the updated frame time.
Implements IBackendSystem.
|
overridevirtual |
Gets the current text from the system clipboard.
Implements IBackendSystem.
|
overridevirtual |
Initializes the internal timer for frame time calculation.
Implements IBackendSystem.
|
overridevirtual |
Implements IBackendSystem.
|
overridevirtual |
Polls for new events from the backend system.
Should invoke registered callbacks for each event type as events are received and reinterpreted from SDL events.
Implements IBackendSystem.
|
overridevirtual |
Sets the cursor to the standard arrow shape.
Implements IBackendSystem.
|
overridevirtual |
Sets the cursor to the crosshair shape.
Implements IBackendSystem.
|
overridevirtual |
Sets the cursor to the hand shape.
Implements IBackendSystem.
|
overridevirtual |
Sets the cursor to the I-beam shape.
Implements IBackendSystem.
|
overridevirtual |
Sets the cursor to the wait (hourglass) shape.
Implements IBackendSystem.
|
overridevirtual |
Updates the frame time based on the elapsed time since the last frame.
| time_scale | A modifier to scale the delta time, useful for implementing slow-motion or speed-up effects. |
Implements IBackendSystem.