StevEngine
StevEngine is a customizable C++ game engine.
|
Main engine class managing core systems. More...
#include <main/Engine.hpp>
Public Member Functions | |
Engine (std::string title, GameSettings gameSettings) | |
Create engine instance. | |
int | Start () |
Start engine main loop. | |
EventManager * | GetEvents () |
Get engine event manager. | |
double | getFPS () const |
Get current FPS. | |
GameSettings | GetGameSettings () const |
Get current engine settings. | |
void | SetSettings (GameSettings gameSettings) |
Update engine settings. | |
void | SetTargetFPS (int targetFPS) |
Set target FPS. | |
void | SetVSync (bool vsync) |
Set vertical sync. | |
void | SetFullscreen (bool fullscreen) |
Set fullscreen mode. | |
void | SetWindowSize (int width, int height) |
Set window size. | |
Public Attributes | |
SDL_Window * | window |
Main game window. | |
bool | running |
Whether engine is running. | |
const std::string | title |
Game window title. | |
Main engine class managing core systems.
Handles initialization, main loop, and cleanup of engine systems. Manages window, events, timing, and settings.
StevEngine::Engine::Engine | ( | std::string | title, |
GameSettings | gameSettings ) |
Create engine instance.
title | Window title |
gameSettings | Initial engine settings |
|
inline |
Get engine event manager.
double StevEngine::Engine::getFPS | ( | ) | const |
Get current FPS.
|
inline |
Get current engine settings.
void StevEngine::Engine::SetFullscreen | ( | bool | fullscreen | ) |
Set fullscreen mode.
fullscreen | Whether to enable fullscreen |
void StevEngine::Engine::SetSettings | ( | GameSettings | gameSettings | ) |
Update engine settings.
gameSettings | New settings to apply |
void StevEngine::Engine::SetTargetFPS | ( | int | targetFPS | ) |
Set target FPS.
targetFPS | New target (-1 for unlimited) |
void StevEngine::Engine::SetVSync | ( | bool | vsync | ) |
Set vertical sync.
vsync | Whether to enable vsync |
void StevEngine::Engine::SetWindowSize | ( | int | width, |
int | height ) |
Set window size.
width | New width |
height | New height |
int StevEngine::Engine::Start | ( | ) |
Start engine main loop.