StevEngine
StevEngine is a customizable C++ game engine.
Loading...
Searching...
No Matches
StevEngine::Engine Class Reference

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.
 
EventManagerGetEvents ()
 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.
 

Detailed Description

Main engine class managing core systems.

Handles initialization, main loop, and cleanup of engine systems. Manages window, events, timing, and settings.

Constructor & Destructor Documentation

◆ Engine()

StevEngine::Engine::Engine ( std::string title,
GameSettings gameSettings )

Create engine instance.

Parameters
titleWindow title
gameSettingsInitial engine settings

Member Function Documentation

◆ GetEvents()

EventManager * StevEngine::Engine::GetEvents ( )
inline

Get engine event manager.

Returns
Pointer to event manager

◆ getFPS()

double StevEngine::Engine::getFPS ( ) const

Get current FPS.

Returns
Current frames per second

◆ GetGameSettings()

GameSettings StevEngine::Engine::GetGameSettings ( ) const
inline

Get current engine settings.

Returns
Current settings struct

◆ SetFullscreen()

void StevEngine::Engine::SetFullscreen ( bool fullscreen)

Set fullscreen mode.

Parameters
fullscreenWhether to enable fullscreen

◆ SetSettings()

void StevEngine::Engine::SetSettings ( GameSettings gameSettings)

Update engine settings.

Parameters
gameSettingsNew settings to apply

◆ SetTargetFPS()

void StevEngine::Engine::SetTargetFPS ( int targetFPS)

Set target FPS.

Parameters
targetFPSNew target (-1 for unlimited)

◆ SetVSync()

void StevEngine::Engine::SetVSync ( bool vsync)

Set vertical sync.

Parameters
vsyncWhether to enable vsync

◆ SetWindowSize()

void StevEngine::Engine::SetWindowSize ( int width,
int height )

Set window size.

Parameters
widthNew width
heightNew height

◆ Start()

int StevEngine::Engine::Start ( )

Start engine main loop.

Returns
Exit code

The documentation for this class was generated from the following files: