jade-engine  0.0
JadeEngine::GameInitParams Struct Reference

Public Attributes

uint32_t renderingResolutionWidth
 
uint32_t renderingResolutionHeight
 
std::string windowName
 
std::string appName
 
std::vector< uint32_t > fontSizes
 
SDL_Color backgroundColor
 
std::vector< GameInitParamsTextureEntrytextures
 
std::vector< GameInitParamsFontEntryfonts
 
std::vector< GameInitParamsSoundEntrysounds
 
std::vector< GameInitParamsCursorEntrycursors
 
std::vector< GameInitParamsSpriteSheetEntryspritesheets
 
std::vector< GameInitParamsKeyBindingEntrykeybindings
 
bool settingPersistenceEnabled
 
std::string author
 
int32_t copyrightYear
 
int32_t majorVersion
 
int32_t minorVersion
 
std::string hashVersion
 

Member Data Documentation

◆ appName

std::string JadeEngine::GameInitParams::appName

String representing the game name used for the settings file name.

Will be used in file operations and should be a valid file and folder name for the targeted system. Note the jade-engine will create a folder with this name in AppData for Windows and create settings file with the same name there.

◆ author

std::string JadeEngine::GameInitParams::author

Name of person or organization behind the game.

Displayed in MainMenuScene inside copyright text.

◆ backgroundColor

SDL_Color JadeEngine::GameInitParams::backgroundColor

Background color of the game screen, alpha component is ignored.

Each rendering frame following operation SDL_SetRenderDrawColor(backgroundColor) -> SDL_RenderClear happen as the very first thing. Note that this is RGBA as uint8_t, i.e. 0-255.

◆ copyrightYear

int32_t JadeEngine::GameInitParams::copyrightYear

Year for copyright text displayed in MainMenuScene.

◆ cursors

std::vector<GameInitParamsCursorEntry> JadeEngine::GameInitParams::cursors

List of cursor texture files to load during game initialization and create cursors out of them.

Cursors are loaded using SDL2 IMG library, namely IMG_Load() function and then passed to SDL2 SDL_CreateColorCursor().

See also
GameInitParamsCursorEntry

◆ fonts

std::vector<GameInitParamsFontEntry> JadeEngine::GameInitParams::fonts

List of font files to load during game initialization.

Fonts are generally referenced using the std::string originating in FontStyleEntry::assetName and uint32_t size that has been listed in GameInitParams::fontSizes.

Fonts are loaded using SDL2 TTF library, namely TTF_OpenFont() function.

See also
GameInitParamsFontEntry, GameInitParams::fontSizes

◆ fontSizes

std::vector<uint32_t> JadeEngine::GameInitParams::fontSizes

List of font sizes that will be generated for each font in fonts member.

It is not currently possible to add font sizes during runtime.

See also
GameInitParams::fonts

◆ hashVersion

std::string JadeEngine::GameInitParams::hashVersion

Hash version of the game.

Displayed in the in MainMenuScene.

See also
majorVersion, minorVersion

◆ keybindings

std::vector<GameInitParamsKeyBindingEntry> JadeEngine::GameInitParams::keybindings

List of key-bindings that can be used with Input class.

Key-bindings are stored in settings files to persist across sessions and are displayed and configurable in OptionsMenuScene.

See also
GameInitParamsKeyBindingEntry

◆ majorVersion

int32_t JadeEngine::GameInitParams::majorVersion

Major version of the game.

Used together with minor version in settings file to determine whether the settings is compatible. Both majorVersion and minorVersion stored in the settings file have to be equal to those passed in GameInitParams otherwise the settings file we be recreated. Displayed in the in MainMenuScene.

See also
minorVersion

◆ minorVersion

int32_t JadeEngine::GameInitParams::minorVersion

Minor version of the game.

Used together with major version in settings file to determine whether the settings is compatible. Both majorVersion and minorVersion stored in the settings file have to be equal to those passed in GameInitParams otherwise the settings file we be recreated. Displayed in the in MainMenuScene.

See also
majorVersion

◆ renderingResolutionHeight

uint32_t JadeEngine::GameInitParams::renderingResolutionHeight

Height in pixels of "rendering" resolution that will be used to draw all game objects.

See also
GameInitParams::renderingResolutionWidth

◆ renderingResolutionWidth

uint32_t JadeEngine::GameInitParams::renderingResolutionWidth

Width in pixels of "rendering" resolution that will be used to draw all game objects.

What is presented on the screen is potentially scaled version of that depending on the user chosen "display" resolution. All assets should be targeting this rendering resolution.

◆ settingPersistenceEnabled

bool JadeEngine::GameInitParams::settingPersistenceEnabled

Whether setting values will be persist between sessions.

If set to true the game will create a setting file in AppData.

See also
Persistence

◆ sounds

std::vector<GameInitParamsSoundEntry> JadeEngine::GameInitParams::sounds

List of sound files to load during game initialization.

Sounds are loaded using SDL2 Mixer library, namely Mix_LoadWAV() function.

See also
GameInitParamsSoundEntry

◆ spritesheets

std::vector<GameInitParamsSpriteSheetEntry> JadeEngine::GameInitParams::spritesheets

List of sprite-sheets to load during game initialization.

Sprite-sheets are collection of textures packed into one texture with corresponding configuration file specifying the layout. jade-engine can read configuration JSON files produced by free version TexturePacker.

The texture parts are loaded using SDL2 IMG library, namely IMG_Load() function.

See also
GameInitParamsSpriteSheetEntry

◆ textures

std::vector<GameInitParamsTextureEntry> JadeEngine::GameInitParams::textures

List of textures to load during game initialization.

Textures are loaded using SDL2 IMG library, namely IMG_Load() function.

See also
GameInitParamsTextureEntry

◆ windowName

std::string JadeEngine::GameInitParams::windowName

String displayed in the title of window.

See also
SDL_CreateWindow::title

The documentation for this struct was generated from the following file: