#include <SDL.h>
Include dependency graph for Video.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Video_t
 Video handle data. More...
 

Typedefs

typedef struct Video_t Video
 Video handle type.
 

Functions

void Video_Free (Video *pstVideo)
 Free video. More...
 
Sint8 Video_Init (const char *pacWindowTitle, const Sint32 s32WindowWidth, const Sint32 s32WindowHeight, const Sint32 s32LogicalWindowWidth, const Sint32 s32LogicalWindowHeight, const SDL_bool bFullscreen, Video **pstVideo)
 Initialise video. More...
 
void Video_RenderScene (Video *pstVideo)
 Render scene. More...
 
Sint8 Video_SetZoomLevel (const double dZoomLevel, Video *pstVideo)
 Set zoom-level. More...
 
Sint8 Video_ToggleFullscreen (Video *pstVideo)
 Toggle fullscreen. More...
 

Function Documentation

◆ Video_Free()

void Video_Free ( Video pstVideo)

Free video.

Frees up allocated memory and destroys window

Parameters
pstVideoPointer to video handle

◆ Video_Init()

Sint8 Video_Init ( const char *  pacWindowTitle,
const Sint32  s32WindowWidth,
const Sint32  s32WindowHeight,
const Sint32  s32LogicalWindowWidth,
const Sint32  s32LogicalWindowHeight,
const SDL_bool  bFullscreen,
Video **  pstVideo 
)

Initialise video.

Initialises video and creates window

Parameters
pacWindowTitleWindow title
s32WindowWidthWindow width in pixel
s32WindowHeightWindow height in pixel
s32LogicalWindowWidthLogical window width in pixel
s32LogicalWindowHeightLogical window height in pixel
bFullscreenInitial fullscreen state
pstVideoPointer to video handle
Returns
Error code
Return values
0OK
-1Error
Here is the call graph for this function:

◆ Video_RenderScene()

void Video_RenderScene ( Video pstVideo)

Render scene.

Render/draw current scene

Parameters
pstVideoPointer to video handle

◆ Video_SetZoomLevel()

Sint8 Video_SetZoomLevel ( const double  dZoomLevel,
Video pstVideo 
)

Set zoom-level.

Sets zoom-level

Parameters
dZoomLevelZoom-level
pstVideoPointer to video handle
Returns
Error code
Return values
0OK
-1Error
Here is the caller graph for this function:

◆ Video_ToggleFullscreen()

Sint8 Video_ToggleFullscreen ( Video pstVideo)

Toggle fullscreen.

Togggles fullscreen state

Parameters
pstVideoPointer to video handle
Returns
Error code
Return values
0OK
Negativeerror code: failure