Configuration Options

Command line options and tools

Running core.exe from command line

core.exe can be invoked either via the GamesManager or directly via the command line. For ease of debugging command line parameters can also be placed in a params.txt file in the MGDF root directory (the contents of this file will have preference over anything specified on the command line)

-logLevel
[Optional] Allows you to specify the logging verbosity, possible values in descending order of verbosity log_low|log_medium|log_high|log_error
-userdiroverride
[Optional] If specified, the directory from which to load and save user specific data to (save games/preferences etc.) will be either the gamesdir override (if specified) or application directory. If this parameter is omitted, the data directory will be the users appData\Local\MGDF\uid folder
-gamediroverride
[Optional] Allows you to specify a directory from which to load games from (by default this is the core.exe's application /game subdirectory)

Running GamesManager.exe from command line

GamesManager.exe run without any arguments will check for updates and launch the game in its /game folder. However it also has a couple of arguments which can be useful to run as part of a games installer such as NSIS

-register
[Optional] In order to make installing/uninstalling your game easier. When invoked will install any framework dependencies (for example the Visual C++ runtime), as well as any installed program registry entries, desktop shortcuts, start menu shortcuts and windows games explorer integration required.
-deregister
[Optional] Removes anything added via the register argument (with the exception of framework dependancies)
-userdiroverride
[Optional] If specified, the directory from which to load and save user specific data to (save games/preferences etc.) will be either the gamesdir override (if specified) or application directory. If this parameter is omitted, the data directory will be the users appData\Local\MGDF\uid folder
-gamediroverride
[Optional] Allows you to specify a directory from which to load games from (by default this is the core.exe's application /game subdirectory)
-noupdatecheck
[Optional] Disables any checking for updates before launching

PackageGen.exe

PackageGen.exe is a tool supplied in the SDK (Found in the Bin folder of the SDK) and allows you to create MGDF game packages or create a game update package based upon the difference between two existing game packages. Packages created by this tool can then be posted for download by the GamesManager as updates. Full game packages are simply a zip file containing the contents of the /game folder. Game update packages are similar, though they include an extra update.json file which specifies which old files should be removed before installing, and only includes files which have changed since the last full package was installed - as such they typically result in smaller download sizes.

Usage

PackageGen "framework /game folder" -o "game package file"

Creates a new installer package from a directory.

PackageGen -u "older game package file" "newer game package file" -o "game update package file"

Creates a new update installer package that contains the differences between the old version to the new one.

Example output
Creating installer package
Creating install package c:\users\glenn\desktop\game.zip ...........
Validating installer package c:\users\glenn\desktop\game.zip
Installer package created
    Version: 0.1
    MD5: bd226dd32804d683348e2708b7288087

Game.json configuration

The game.json file is where all configuration and default preferences for a game is stored. The full schema for a game.json file is as follows

{
    "gameUid":"a unique id",
    "gameName":"A human readable name",
    "version":"0.1",
    "interfaceVersion":"1",
    "developerName":"Human readable developer name",
    "homepage":"http://www.example.com",
    "supportEmail":"[email protected]",
    "supportS3Bucket":"game-crash-reports",
    "supportS3BucketAccessKey":"myawsaccesskey",
    "supportS3BucketSecretKey":"myawssecretkey",
    "updateService":"https://www.example.com/update.json",
    "statisticsService":"https://www.example.com/stats.svc",
    "statisticsPrivacyPolicy":"https://www.example.com/privacy",
    "preferences":{
        "key":"value",
    }
}

Game.json schema

gameUid
[Required] A unique identifier used to partition away game data from other MGDF games. It is important that this value is unique, so we recommend a GUID or similar string which is unlikely to collide with other MGDF games installed on a users system
gameName
[Required] A human readable name of the game. This will be used for any user visible display of the game in the GamesManager user interface
version
[Required] A version string in the format major.minor.revision.build.
interfaceVersion
[Required] The host interface version supported by the module. Currently, this should always be "1"
developerName
[Required] A human readable description of the games developer. This will be displayed when the GamesManager requires the users permission to do something, for example to collect game statistics.
homepage
[Optional] A url to the game's homepage, this will be added to the entry for the game in the Windows installed programs list if provided
supportEmail
[Optional] An email address shown to users when crashes and other errors occur so that they can submit error reports
supportS3Bucket
[Optional] An Amazon S3 Bucket which MGDF can automatically upload crash reports to. If specified this mode of error reporting is used instead of prompting the user to send a report to the support email address.
supportS3BucketAccessKey
[Optional] Access key for an S3 user with access to the support S3 bucket. Note: For security you should ensure this user has the minimum possible permissions, ideally write only access to the support bucket and nothing else.
supportS3BucketSecretKey
[Optional] Secret key for an S3 user with access to the support S3 bucket.
updateService
[Optional] A url used to check for updates (see Update manifest configuration for more information)
statisticsService
[Optional] A url used to post game statistics information to (see Statistics service configuration for more information)
statisticsPrivacyPolicy
[Required if statisticsservice is set] A url containing the privacy policy information for a developer who wishes to collect game statistics. This url is shown to the user when the GamesManager asks thier permission to gather statistics. If it is not specified, then no statistics can be collected
preferences
[Optional] A dictionary of strings specifying any preferences used by the game. These can be accessed via the IGame Get/Set/HasPreference methods. A number of built in preferences are also used by the MGDF host and are always prefixed with host. The full list of built in preferences is shown below. These built in preferences can be overridden by specifying them in the game.json file.

Built in host preferences

host.musicVolume
A string value between 0 and 1 that sets the volume for all music played using ISoundStreams. Defaults to "1.0"
host.soundVolume
A string value between 0 and 1 that sets the volume for all sounds played using ISounds. defaults to "1.0"
host.simFps
The target framerate of the sim thread. If the sim thread is able to run faster than this, the host will add in sleeps between timesteps to ensure that the sim is limited to this framerate (note the render thread framerate is unaffected by this setting). Defaults to "60"
host.screenX
The desired horizontal resolution to display the game at when running in fullscreen. If this resolution is not possible on the current display, then the native resolution will be used instead. Defaults to "1024"
host.screenY
The desired vertical resolution to display the game at when running in fullscreen. If this resolution is not possible on the current display, then the native resolution will be used instead. Defaults to "768"
host.fullScreen
Whether to start the game in fullscreen ("1") or in windowed mode ("0"). Defaults to "0"
host.multiSampleLevel
The desired multisample level to use for the backbuffer, if this is not supported on the current display device, then the next highest level that is supported will be used instead. Defaults to "1"
host.RTMultiSampleLevel
The desired multisample level to use for render target buffers. Modules don't have to use this setting, though it is recommended. Defaults to "1"
host.vsync
Whether or not to use vsync on the render thread ("1"), or whether to render frames fast as possible ("0"). Defaults to "1"
host.interpolateFrames
Determines whether the render thread waits at least 1 simulation tick before rendering a new frame ("0"), or whether it should render multiple frames or the same simulation state ("1") and have an interpolation factor passed in by the host. Defaults to "0". Games which have a simulation fps that is the same or higher than the render framerate should typically pick "0", however for games with a simulation fps slower than the renderer frame rate, using "1", may be the only way to prevent slow or 'janky' animation
host.windowResize
Whether to allow resizing of the game window in windowed mode ("1") or to have a fixed size window ("0"). This setting is provided as resizing the window may cause a D3D device reset. Because of this, having a resizable window means your game will have to be able to handle this. If you don't want to worry about this, leave it at the default of "0"
host.windowSizeX
The desired horizontal size of the window when in windowed mode. Defaults to "1024"
host.windowSizeY
The desired vertical size of the window when in windowed mode. Defaults to "768"

Game update manifest

The game update manifest file is a json file whose location is specified in the updateservice property of the game.json file. This file is used to determine if updates to a game are available. The full schema for an update manifest file is shown below.

NOTE The GamesManager supports downloading game updates from urls that use http authentication (either basic or digest) if you want to restrict download access to paid users. The GamesManager will pop up a username/password prompt in this case before the update will proceed.

{
  "framework": {
    "version": "0.11.22",
    "url": "https://s3.matchstickframework.org/MGDF_0.11.22_x64.zip",
    "md5": "be4573e2058fa6106093443e6c7857d1"
  },
  "latest": {
    "version": "0.2.4",
    "url": "https://www.example.com/game_0.2.4.zip",
    "md5": "8059891b6663315a72a954c282a963c8"
  },
  "updateOlderVersions": [
    {
      "url": "https://www.example.com/game_0.2.4_update.zip",
      "md5": "eac5db79ad1fa8f61d20283fef37ad33",
      "fromVersion": "0.2.2",
      "toVersion": "0.2.3"
    }
  ]
}

Game update manifest schema

framework
[Optional] Used to specify which version of the MGDF framework the game should use. This is useful as it gives you control over which framework version you want your game to run on and can update the framework as you require. The framework .zip file should be a framework distributable which can be found in the MGDF SDK download
latest
[Required] Specifies the latest version of your game which is available. This zip file must be a game package built by the MGDF SDK PackageGen tool
updateOlderVersions
[Optional] Specifies a list of partial upgrade packages which can upgrade a version fromVersion - toVersion up to the latest version. The partial update zip file should be an update package built by the MGDF SDK PackageGen tool

Statistics service

The MGDF statistics service works by having the GamesManager upload lists of statistics (created by calls to the IStatisticsManager inside a running game) to a restful json web service endpoint specified in a games game.json file. In order to use this feature you will need to implement a compatible web service that implements the methods shown below

Request fields

gameUid
A string value of up to 255 characters in length.
sessionId
A string value of up to 255 characters in length. All statistic key/values should be associated with this session id.
statistics
An array of statistic objects containing the fields below.
  • timestamp An unsigned integer value marking the time the statistic was recorded. The time interval is measured in seconds since the beginning of the current session.
  • name A string value of up to 255 characters in length.
  • value A string value of up to 255 characters in length.

Sample HTTP request to http://example.com/statistics (Note the statisticsservice url in game.json would be http://example.com in this case)

POST http://example.com/statistics HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: example.com
Content-Length: 146
{"gameUid":"blah","sessionId":"xxxx","statistics":[{"timestamp":0,"name":"key1","value":"value1"},{"timestamp":1,"name":"key2","value":"value2"}]}
        

Response fields

errors
An array of strings containing any errors caused in processing the request. If the request is successful, this array will be empty.
success
A boolean value that is true if the request was successfully processed, false otherwise.

Sample HTTP response

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 29
{"errors":[], "success":true}
        

Functions

There are a number of functions which can be exported by a module which are used by the host to create the module instance and to query the requirements of the module.

GetCompatibleFeatureLevels Allows a module to tell the host what D3D11 feature level to try and use when creating the D3D device.

UINT32 GetCompatibleFeatureLevels ( D3D_FEATURE_LEVEL * levels , UINT32 * levelSize )
Parameters
levels An array supplied to the module to fill with acceptable D3D feature levels
levelSize The size of the levels array
Returns
0 if the supplied levels array is large enough, otherwise returns the size required

GetCustomArchiveHandlers Allows a module to tell the host if it is going to provide any custom virtual file system handlers.

bool GetCustomArchiveHandlers ( IArchiveHandler ** list , UINT32 * length , ILogger * logger , IErrorHandler * errorHandler )
Parameters
list A pointer to an array of characters to store the saves in
length The length of the list array
logger A callback interface allowing the archive handler to write to the MGDF logs
errorHandler A callback interface allowing the archive handler to trigger fatal errors
Returns
Returns true if the supplied list is large enough to contain all the items in the list, otherwise returns false and sets the required size in the length parameter

GetModule Factory function which returns an instance of the module to the host.

IModule * GetModule ( )
Returns
An instance of the module interface

IsCompatibleInterfaceVersion Allows a module to assert if the host trying to run the module is compatible with the module.

bool IsCompatibleInterfaceVersion ( INT32 Interface )
Parameters
Interface The MGDF interface version supported by the host
Returns
True if the module supports the interface provided by the host

Interfaces

Once the module has been created, it can access the MGDF host's functionality using the following interfaces. Most of these interfaces are not directly accessible to a module, but are instead properties of the ISimHost and IRenderHost interfaces.

IArchiveHandler Provides an interface for creating portions of the vfs tree from archive files.

  • MapArchive Get the root node of the mapped vfs subtree

    IFile * MapArchive ( const wchar_t * name , const wchar_t * physicalPath , IFile * parent )
    Parameters
    name The name of the archive
    physicalPath The physical path on disk containing the archive
    parent The VFS parent node of the archive
    Returns
    The root node of the mapped vfs subtree
  • IsArchive Whether this file/directory is recognised as an archive type

    bool IsArchive ( const wchar_t * physicalPath ) const
    Parameters
    physicalPath The physical path on disk of a possible achive file
    Returns
    True if the file is a recognized archive file to be handled by this handler
  • DisposeArchive Tells the archive handler to dispose of an archive which it previously created

    void DisposeArchive ( IFile * archive )
    Parameters
    archive An archive previously created by this handler
  • Dispose Tells the archive handler to dispose of itself.

    void Dispose ( )

ICommonHost Provides an entrypoint for a module to interact with the MGDF host. Methods in this interface are safe to be used from any thread

Inherits from: IErrorHandler

  • GetRenderSettings Get the render settings manager

    IRenderSettingsManager * GetRenderSettings ( ) const
    Returns
    The render settings manager
  • GetLogger Get the host logger

    ILogger * GetLogger ( ) const
    Returns
    The host logger
  • GetTimer Get the host timer

    ITimer * GetTimer ( ) const
    Returns
    The host timer
  • GetMGDFVersion Gets the current version of the framework

    const Version * GetMGDFVersion ( ) const
  • GetVFS Get the virtual filesystem

    IVirtualFileSystem * GetVFS ( ) const
    Returns
    The virtual filesystem
  • GetD3DDevice Get the direct3d device object from the host

    ID3D11Device * GetD3DDevice ( ) const
    Returns
    The direct3d device object from the host
  • GetD2DDevice Get the direct2d device object from the host

    ID2D1Device * GetD2DDevice ( ) const
    Returns
    The direct2d device object from the host
  • GetErrorDescription Get a text description for an MGDF error code

    const char * GetErrorDescription ( MGDFError err ) const
    Parameters
    err The error code to get a description for
    Returns
    A text description for an MGDF error code
  • GetErrorString Get a text name for an MGDF error code

    const char * GetErrorString ( MGDFError err ) const
    Parameters
    err The error code to get the name of
    Returns
    A text name for an MGDF error code

IErrorHandler Provides a means to shut down the host when a fatal error is encountered.

  • FatalError This method should be invoked when a fatal error is encountered.

    void FatalError ( const char * sender , const char * message )
    Parameters
    sender The location or component the error occurred in
    message Details of the fatal error

IFile Provides an interface for navigating a file/directory structure in the virtual filesystem. Directories have no data but can have subfiles Files have no subfiles (except for archives) but may have data. Archives that have been added to the vfs are mapped as files with the same name as the archive filename, but unlike normal files they also have a tree of subdirectories containing the uncompressed archive data

  • GetName Gets the name of this file.

    const wchar_t * GetName ( ) const
    Returns
    The name of this file
  • GetParent Gets the parent of this file.

    IFile * GetParent ( ) const
    Returns
    The parent of this file. If this file is the root of the virtual filesystem, then this will be nullptr
  • GetChild Gets a child of this file with the given name (if any)

    IFile * GetChild ( const wchar_t * name ) const
    Parameters
    name The child name of this file
    Returns
    The child file of the current file. If no such file exists, nullptr is returned
  • GetAllChildren Get all the children of this file (non-recursive) which match the given wildcard filter.

    bool GetAllChildren ( const IFileFilter * filter , IFile ** childBuffer , size_t * bufferLength ) const
    Parameters
    filter A user supplied filter to filter the results
    childBuffer An array to store the results
    bufferLength The length of the childBuffer. Will be set to the length of the buffer required when the method returns
    Returns
    True if the supplied buffer is large enough to hold all the results, otherwise returns false and sets the size required in bufferLength.
  • GetChildCount Get how many children this file has.

    size_t GetChildCount ( ) const
    Returns
    How many children this file has
  • IsFolder Determines if the file entity is a folder

    bool IsFolder ( ) const
    Returns
    True if the file is a folder
  • IsOpen Determines if the file has an open reader

    bool IsOpen ( ) const
    Returns
    True if the file has an open reader
  • Open Attempt to open the file for reading.

    MGDFError Open ( IFileReader ** reader )
    Parameters
    reader Will point to any reader that is created
    Returns
    Nullptr if the file cannot be opened or is already open
  • IsArchive Determines if the file is a (or is a member of) an archive file

    bool IsArchive ( ) const
    Returns
    True if the file is a (or is a member of) an archive file
  • GetArchiveName Gets the name of the archive the file belongs to (if any)

    const wchar_t * GetArchiveName ( ) const
    Returns
    The name of the archive file the entity belongs to, otherwise it returns nullptr
  • GetPhysicalPath Get the pyshical path to the IFile in the filesystem

    const wchar_t * GetPhysicalPath ( ) const
    Returns
    The pyshical path to the IFile in the filesystem, in the case of an archive submember this will be the address to the containing archive
  • GetLogicalPath Get the path to the file as expressed as a vfs logical file path (i.e.

    const wchar_t * GetLogicalPath ( ) const
    Returns
    The path to the file as expressed as a vfs logical file path
  • GetLastWriteTime Find the last write time of the file

    time_t GetLastWriteTime ( ) const
    Returns
    A timestamp indicating the last write time

IFileFilter Provides an interface for filtering files from result sets. Clients should implement this interface and pass instances into the relevant VFS methods in order to filter results

  • Accept Whether to include a file in a set of results.

    bool Accept ( const wchar_t * childname ) const
    Parameters
    childname The name of the file to be filtered
    Returns
    True if the file is to be included in a result set, and false if it should be excluded

IFileReader Provides an interface for reading data from a file.

  • Close Closes the file reader, this object cannot be used after this is called

    void Close ( )
  • Read Reads the specified number of bytes into the buffer

    UINT32 Read ( void * buffer , UINT32 length )
    Parameters
    buffer A buffer to store the read data
    length The max amount of data that can be read into the buffer
    Returns
    The amount of bytes actually read into the buffer
  • SetPosition Sets the read position of the file in bytes

    void SetPosition ( INT64 pos )
    Parameters
    pos The read position of the file in bytes
  • GetPosition Get the current read position of the file in bytes

    INT64 GetPosition ( ) const
    Returns
    The read position in the file
  • EndOfFile Determines whether the file read position has reached the end of the file

    bool EndOfFile ( ) const
    Returns
    True if the read position is past the end of the file
  • GetSize Get the size of the file in bytes

    INT64 GetSize ( ) const
    Returns
    The filesize in bytes (for compressed archives this value is the uncompressed size)

IGame Provides information regarding the current game being run and the preferences associated with that game.

  • GetName Get the name of the current game running

    const char * GetName ( ) const
    Returns
    The name of the current game running
  • GetInterfaceVersion Get the interface version the current game supports

    INT32 GetInterfaceVersion ( ) const
    Returns
    The interface version the current game supports
  • GetUid Get the uid of the current game running

    const char * GetUid ( ) const
    Returns
    The name of the current game running
  • GetVersion Get the version of the current game running

    const Version * GetVersion ( ) const
    Returns
    The version of the current game running
  • HasPreference Determine if the game has a preference for the given key

    bool HasPreference ( const char * name ) const
    Parameters
    name The preference name
    Returns
    True if the key has an associated value
  • GetPreference Determine if the game has a preference for the given key and return its value.

    const char * GetPreference ( const char * name ) const
    Parameters
    name The preference name
    Returns
    The value associated with the key or nullptr if there is no such key
  • SetPreference Change the value of a preference

    void SetPreference ( const char * name , const char * value )
    Parameters
    name The preference name
    value The new preference value
  • SavePreferences Save the current preferences list

    void SavePreferences ( ) const
  • ResetPreferences Reload all preferences to thier user independent default values

    void ResetPreferences ( )

IGamepad Provides the ability to query the state of and control other properties of an XInput compatible gamepad connected to the PC. gcconner

  • IsConnected Determines if a controller is connected

    bool IsConnected ( ) const
    Returns
    True if if a controller is connected
  • IsButtonDown Determines if a button is pressed

    bool IsButtonDown ( GamepadButton button ) const
    Parameters
    button The gamepad button code representing the desired button
    Returns
    True if the button is being held down
  • IsButtonUp Determines if a button is NOT pressed

    bool IsButtonUp ( GamepadButton button ) const
    Parameters
    button The gamepad button code representing the desired button
    Returns
    True if the button is not being pressed
  • IsButtonPress Determines if a button press has occured

    bool IsButtonPress ( GamepadButton button )
    Parameters
    button The gamepad button code representing the desired button
    Returns
    True if the button has been pressed (i.e pressed down then released)
  • GetLeftTrigger Returns the state of the controllers left trigger

    INT32 GetLeftTrigger ( ) const
    Returns
    0 for idle to 255 for fully held
  • GetRightTrigger Returns the state of the controllers right trigger

    INT32 GetRightTrigger ( ) const
    Returns
    0 for idle to 255 for fully held
  • GetLeftThumbX Returns the state of the left thumbstick on the X axis

    INT32 GetLeftThumbX ( ) const
    Returns
    -32768 for far left to +32767 for far right
  • GetLeftThumbY Returns the state of the left thumbstick on the Y axis

    INT32 GetLeftThumbY ( ) const
    Returns
    -32768 for top to +32767 for bottom
  • GetRightThumbX Returns the state of the right thumbstick on the X axis

    INT32 GetRightThumbX ( ) const
    Returns
    -32768 for far left to +32767 for far right
  • GetRightThumbY Returns the state of the right thumbstick on the Y axis

    INT32 GetRightThumbY ( ) const
    Returns
    -32768 for top to +32767 for bottom
  • SetVibrationSpeed Sets the vibration intensity in the left and right vibrator motors of the controller, valid values are 0-65535

    void SetVibrationSpeed ( INT32 left , INT32 right )
    Parameters
    left The intensity of the left vibrator motor
    right The intensity of the right vibrator motor

IInputManager Provides a means for modules to access information regarding user input from the mouse, keyboard, and xinput controllers.

  • ShowCursor Determines whether the OS cursor is displayed or not

    void ShowCursor ( bool show )
    Parameters
    show Whether to show the cursor or not
  • IsKeyDown Determines if a key is presed

    bool IsKeyDown ( UINT16 key ) const
    Parameters
    key The Microsoft Virtual key code representing the desired key (see here for a list http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx)
    Returns
    True if the key is being held down
  • IsKeyUp Determines if a key is NOT pressed

    bool IsKeyUp ( UINT16 key ) const
    Parameters
    key The Microsoft Virtual key code representing the desired key (see here for a list http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx)
    Returns
    True if the key is not being pressed
  • IsKeyPress Determines if a keypress has occured

    bool IsKeyPress ( UINT16 key ) const
    Parameters
    key The Microsoft Virtual key code representing the desired key (see here for a list http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx)
    Returns
    True if the key has been pressed (i.e pressed down then released)
  • GetMouseX Get the x position of the mouse

    INT32 GetMouseX ( ) const
    Returns
    The x position of the mouse relative to the left of the screen in pixels
  • GetMouseY Get the y position of the mouse

    INT32 GetMouseY ( ) const
    Returns
    The y position of the mouse relative to the top of the screen in pixels
  • GetMouseDX Get the x movement of the mouse in the current frame

    INT32 GetMouseDX ( ) const
    Returns
    The x movement of the mouse in the current frame
  • GetMouseDY Get the y movement of the mouse in the current frame

    INT32 GetMouseDY ( ) const
    Returns
    The y movement of the mouse in the current frame
  • GetMouseDZ Get the position of the scroll wheel

    INT16 GetMouseDZ ( ) const
    Returns
    The position of the scroll wheel, this value will be between -120 and 120
  • IsButtonDown Determine if a mouse button is down

    bool IsButtonDown ( Mouse mouseButton ) const
    Parameters
    mouseButton The mousebutton code representing the desired button
    Returns
    True if the button is held down
  • IsButtonUp Determine if a mouse button is up

    bool IsButtonUp ( Mouse mouseButton ) const
    Parameters
    mouseButton The mousebutton code representing the desired button
    Returns
    True if the button is NOT held down
  • IsButtonClicked Determine if a mouse button was clicked

    bool IsButtonClicked ( Mouse mouseButton )
    Parameters
    mouseButton The mousebutton code representing the desired button
    Returns
    True if the button has been clicked, i.e held down then released
  • GetGamepads Gets a list of all compatible gamepads connected to the PC

    const IGamepadList * GetGamepads ( ) const
    Returns
    A list of all compatible gamepads connected to the PC

ILogger Provides an interface to the MGDF logging system.

  • SetLoggingLevel Set the current logging verbosity level

    void SetLoggingLevel ( LogLevel level )
    Parameters
    level The verbosity level
  • GetLoggingLevel Get the current logging verbosity level

    LogLevel GetLoggingLevel ( ) const
    Returns
    The current logging verbosity level
  • Add Write an entry to the log

    void Add ( const char * sender , const char * message , LogLevel level )
    Parameters
    sender The location or component writing the log message
    message The content of the log message
    level The verbosity filter for writing out the message. The message will be written if this is less than or equal to the current logging level

IModule An interface which game modules must implement. The MGDF host will call the various module methods in order to allow the game module to respond to events. Methods prefixed with ST will be invoked by the host from the sim thread, methods prefixed with RT will be invoked by the host from the render thread, and methods without a prefix may be invoked by the host from either thread.

  • STNew Called by the host after a module is first created and should be used to do perform any initialization required by the module.

    bool STNew ( ISimHost * host , const wchar_t * workingFolder )
    Parameters
    host The simulation thread host
    workingFolder A folder that the module can read/write data to while its running
    Returns
    False if the module experiences a fatal error on initialization
  • STUpdate Called once per simulation timestep by the host once the game is running and represents the main sim loop.

    bool STUpdate ( ISimHost * host , double elapsedTime )
    Parameters
    host The simulation thread host
    elapsedTime The simulation timestep
    Returns
    False if the module experiences a fatal error updating the scene
  • STShutDown Called by the host to tell the module to cleanup and shutdown as soon as possible.

    void STShutDown ( ISimHost * host )
    Parameters
    host The simulation thread host
  • STDispose Called by the host to dispose of the module.

    bool STDispose ( ISimHost * host )
    Parameters
    host The simulation thread host
    Returns
    False if the module experiences a fatal error cleaning up
  • RTBeforeFirstDraw Called by the host immediately before the first call to RTDrawScene.

    bool RTBeforeFirstDraw ( IRenderHost * host )
    Parameters
    host The render thread host
    Returns
    False if the module experiences a fatal error
  • RTDraw Called by the host once per render frame.

    bool RTDraw ( IRenderHost * host , double alpha )
    Parameters
    host The render thread host
    alpha How far between the current and next simulation frame (0-1)
    Returns
    False if the module experiences a fatal error drawing the scene
  • RTBeforeBackBufferChange Called by the host if the swap chain options need to be changed, or the display window needs to be resized.

    bool RTBeforeBackBufferChange ( IRenderHost * host )
    Parameters
    host The render thread host
    Returns
    False if the module experiences a fatal error
  • RTBackBufferChange Called by the host after the swap chain options has been changed, or the display window has been resized.

    bool RTBackBufferChange ( IRenderHost * host )
    Parameters
    host The render thread host
    Returns
    False if the module experiences a fatal error
  • RTBeforeDeviceReset Called by the host if the dxgi device needs to be removed.

    bool RTBeforeDeviceReset ( IRenderHost * host )
    Parameters
    host The render thread host
    Returns
    False if the module experiences a fatal error
  • RTDeviceReset Called by the host after the dxgi device has been reset, the module should recreate any device dependent resources that were removed in RTBeforeDeviceReset.

    bool RTDeviceReset ( IRenderHost * host )
    Parameters
    host The render thread host
    Returns
    False if the module experiences a fatal error
  • Panic Called by the host when a fatalError event occurs.

    void Panic ( )

IPerformanceCounter A names performance counter that can be used to time the duration of events. The results of these counters are shown in the MGDF stats overlay (press ALT-F12 to see in game)

Inherits from: IUnknown

  • GetName Gets the name of the counter.

    const char * GetName ( ) const
    Returns
    The name of the counter
  • Begin Begin timing.

    void Begin ( )
  • End End timing and record the duration between the time when begin was called and when End was called.

    void End ( )

IRenderHost Provides an entrypoint for a module to interact with the MGDF host. This interface inherits from ICommonHost and provides additional methods which are safe to be used ONLY from the render thread.

Inherits from: ICommonHost IErrorHandler

  • GetD3DImmediateContext Get the direct3d device immediate context object from the host

    ID3D11DeviceContext * GetD3DImmediateContext ( ) const
    Returns
    The direct3d deviceimmediate context object from the host
  • GetRenderTimer Get the direct3d timer object from the host

    IRenderTimer * GetRenderTimer ( ) const
    Returns
    The direct3d timer object from the host
  • SetBackBufferRenderTarget Set the current back buffer as the render target for the specified d2d device context

    bool SetBackBufferRenderTarget ( ID2D1DeviceContext * context )
    Parameters
    context The d2d device context to set the render target for
    Returns
    True if the back buffer can be set as the render target for the device context
  • GetBackBuffer Gets the current back buffer texture.

    ID3D11Texture2D * GetBackBuffer ( ) const
  • GetBackBufferDescription Gets the description of the backbuffer texture.

    void GetBackBufferDescription ( D3D11_TEXTURE2D_DESC * desc ) const
    Parameters
    desc The backbuffer description to populate

IRenderSettingsManager Provides an interface for getting and setting the hosts various display settings.

  • GetVSync Gets the current vsync setting

    bool GetVSync ( ) const
    Returns
    True if vsync is enabled
  • SetVSync Sets the current vsync setting

    void SetVSync ( bool vsync )
    Parameters
    vsync True if vsync is to be enabled
  • GetFullscreen Gets the current fullscreen setting

    bool GetFullscreen ( ) const
    Returns
    True if the game is in fullscreen mode
  • SetFullscreen Sets the current fullscreen setting

    void SetFullscreen ( bool fullscreen )
    Parameters
    fullscreen True if the game should display in fullscreen mode
  • GetMultiSampleLevelCount Get the number of supported multisample levels

    UINT32 GetMultiSampleLevelCount ( ) const
    Returns
    The number of supported multisample levels
  • GetMultiSampleLevel Get the available multisample level supported by the display adaptor at the given index ( 0 to GetMultiSampleLevelCount() - 1 )

    bool GetMultiSampleLevel ( UINT32 index , UINT32 * level ) const
    Parameters
    index The multisample index
    level Returns the multisample level at the given index
    Returns
    True if a supported multisample level is present at the given index, false otherwise.
  • SetBackBufferMultiSampleLevel Set the display adaptors current multisample level, this changed setting is not applied until ApplySettings is called.

    bool SetBackBufferMultiSampleLevel ( UINT32 multisampleLevel )
    Parameters
    multisampleLevel The desired multisample level for the backbuffer
    Returns
    Returns false if the desired multisample level cannot be set.
  • GetBackBufferMultiSampleLevel Get the current multisample level in use by the adaptor

    UINT32 GetBackBufferMultiSampleLevel ( ) const
    Returns
    The current multisample level in use by the adaptor
  • SetCurrentMultiSampleLevel Set the desired multisample level for off screen render targets.

    bool SetCurrentMultiSampleLevel ( UINT32 multisampleLevel )
    Parameters
    multisampleLevel The desired multisample level for off screen render targets
    Returns
    Returns false if the desired multisample level cannot be set.
  • GetCurrentMultiSampleLevel Get the current desired multisample level for off screen render targets

    UINT32 GetCurrentMultiSampleLevel ( UINT32 * quality ) const
    Parameters
    quality If specified this parameter will be initialized with the maximum multisampling quality setting for the current multisample level
    Returns
    The current desired multisample level for off screen render targets
  • GetAdaptorModeCount Get the number of supported adaptor modes

    UINT32 GetAdaptorModeCount ( ) const
    Returns
    The number of supported adaptor modes
  • GetAdaptorMode Get a supported adaptor mode at the given index (0 to GetAdaptorModeCount - 1 )

    bool GetAdaptorMode ( UINT32 index , AdaptorMode * mode ) const
    Parameters
    index The adaptor mode index
    mode Will be set to the the adaptor mode at the given index
    Returns
    True if an adaptor mode exists at a particular index
  • GetAdaptorMode Get the adaptor mode (if any) matching the requested width and height, if no matching adaptor is found, false is returned

    bool GetAdaptorMode ( UINT32 width , UINT32 height , AdaptorMode * mode ) const
    Parameters
    width The desired width of the adaptor mode
    height The desired height of the adaptor mode
    mode Will be set to the matching adaptor mode found (if any)
    Returns
    True if a supported adaptor mode exists for the given width and height
  • GetCurrentAdaptorMode Get the current adaptor mode being used when running in fullscreen mode

    void GetCurrentAdaptorMode ( AdaptorMode * mode ) const
    Parameters
    mode Will be set to the current adaptor mode being used.
  • SetCurrentAdaptorMode Sets the current display adaptor mode when running in fullscreen mode, this changed setting is not applied until ApplyChanges is called.

    bool SetCurrentAdaptorMode ( const AdaptorMode * mode )
    Parameters
    mode The adaptor mode to use
    Returns
    True if the adaptor mode is supported and can be applied, false otherwise
  • SetCurrentAdaptorModeToNative Sets the current display adaptor mode when running in fullscreen mode to the screens native fullscreen resolution.

    bool SetCurrentAdaptorModeToNative ( )
    Returns
    True if the adaptor mode could be changed, false otherwise
  • SetWindowSize Sets the size of the window when running in windowed mode.

    void SetWindowSize ( UINT32 width , UINT32 height ) const
    Parameters
    width The width of the window
    height The height of the window
  • GetScreenX Get the current screen width, based on the current adaptor mode in fullscreen, or on the window dimensions otherwise

    UINT32 GetScreenX ( ) const
    Returns
    The current screen width
  • GetScreenY Get the current screen height, based on the current adaptor mode in fullscreen, or on the window dimensions otherwise

    UINT32 GetScreenY ( ) const
    Returns
    Thr current screen height
  • ApplyChanges Queues the swap chain to be reset on the beginning of the next frame.

    void ApplyChanges ( )

IRenderTimer This provides an interface to Direct3D GPU timers

  • CreateGPUCounter Create a performance counter for profiling GPU time taken in DirectX API calls.

    MGDFError CreateGPUCounter ( const char * name , IPerformanceCounter ** counter )
    Parameters
    name The name of the counter
    counter Points to the created counter
    Returns
    MGDF_ERR_GPU_TIMER_UNSUPPORTED if GPU counters are unsupported (using D3D_FEATURE_LEVEL_9_3 or less) otherwise returns MGDF_OK

ISimHost Provides an entrypoint for a module to interact with the MGDF host. This interface inherits from ICommonHost and provides additional methods which are safe to be used ONLY from the sim thread.

Inherits from: ICommonHost IErrorHandler

  • BeginSave Tells the host to provide a location on disk to save the current game data.

    MGDFError BeginSave ( const char * saveName , wchar_t * saveBuffer , UINT32 * size )
    Parameters
    saveName The name of the module save file. Only alphanumeric characters and space are valid characters.
    saveBuffer The buffer to fill in the supplied save directory
    size The size of saveBuffer, if saveBuffer is too small, size will be changed to the size required.
    Returns
    MGDF_OK if saveBuffer is large enough to fit the supplied save directory, otherwise returns MGDF_ERR_BUFFER_TOO_SMALL. If the saveName is invalid, the function returns an error code
  • CompleteSave Finalizes the save data for a matching call to BeginSave

    MGDFError CompleteSave ( const char * saveName )
    Parameters
    saveName The save to complete
    Returns
    MGDF_OK if the saveName was in a pending state and was completed successfully, if there was a problem, or the saveName didn't exist then an error code is returned.
  • GetSaves Populates the supplied vector with the names of all saved instances of this configuration The names returned in this list represent all the valid arguments to queueLoadState for the current configuration

    const IStringList * GetSaves ( ) const
    Returns
    The list to fill with save names
  • RemoveSave Deletes a selected save game from the hard drive

    void RemoveSave ( const char * saveName )
    Parameters
    saveName The save to remove
  • Load Tells the host to find the location on disk for the specified save game

    MGDFError Load ( const char * saveName , wchar_t * loadBuffer , UINT32 * size , Version & version )
    Parameters
    saveName The name of the module save file
    loadBuffer The buffer to fill in the supplied save directory
    size The size of saveBuffer, if saveBuffer is too small, size will be changed to the size required.
    version The version number of the save game. can be useful for migrating save games.
    Returns
    MGDF_OK if saveBuffer is large enough to fit the supplied load directory, otherwise returns MGDF_ERR_BUFFER_TOO_SMALL. If the saveName is invalid, the function returns an error code
  • GetGame Get information regarding the current game and its preferences

    IGame * GetGame ( ) const
    Returns
    Object containing information regarding the game and its preferences
  • GetSound Get the audio manager

    ISoundManager * GetSound ( ) const
    Returns
    The audio manager, nullptr if the audio subsystem failed to initialize
  • GetStatistics Get the statistics manager

    IStatisticsManager * GetStatistics ( ) const
    Returns
    The statistics manager
  • GetInput Get the input manager

    IInputManager * GetInput ( ) const
    Returns
    The input manager
  • ShutDown Tells the host to shut down the game immediately

    void ShutDown ( )
  • QueueShutDown Tells the host to invoke the modules shutdown callback

    void QueueShutDown ( )

ISound An audio source in 3d space.

Inherits from: IUnknown

  • GetName The name of the sound.

    const wchar_t * GetName ( ) const
    Returns
    The name of the sound
  • GetPosition The position of the sound.

    DirectX::XMFLOAT3 * GetPosition ( )
    Returns
    The position of the sound
  • GetVelocity The velocity of the sound.

    DirectX::XMFLOAT3 * GetVelocity ( )
    Returns
    The velocity of the sound
  • GetInnerRange The distance (from the observer) at which the sound intensity reaches its maximum.

    float GetInnerRange ( ) const
    Returns
    The distance (from the observer) at which the sound intensity reaches its maximum. Getting closer than this will not cause the sound intensity to get any greater
  • SetInnerRange Set The distance (from the observer) at which the sound intensity reaches its maximum.

    void SetInnerRange ( float innerRange )
    Parameters
    innerRange The distance (from the observer) at which the sound intensity reaches its maximum. Getting closer than this will not cause the sound intensity to get any greater
  • GetOuterRange The distance (from the observer) at which the sound intensity reaches 0.

    float GetOuterRange ( ) const
    Returns
    The distance (from the observer) at which the sound intensity reaches its 0
  • SetOuterRange Set The distance (from the observer) at which the sound intensity reaches 0.

    void SetOuterRange ( float outerRange )
    Parameters
    outerRange The distance (from the observer) at which the sound intensity reaches 0
  • GetSourceRelative Does the sound stay relative to the listeners position or is it fixed in absolute space.

    bool GetSourceRelative ( ) const
    Returns
    True if the sound is always relative to the listeners position
  • SetSourceRelative Does the sound stay relative to the listeners position or is it fixed in absolute space.

    void SetSourceRelative ( bool sourceRelative )
    Parameters
    sourceRelative True if the sound is always relative to the listeners position
  • GetVolume Get the current volume of the sound (ignoring attenuation due to position)

    float GetVolume ( ) const
    Returns
    The current volume of the sound (ignoring attenuation due to position)
  • SetVolume Set the current volume of the sound (ignoring attenuation due to position)

    void SetVolume ( float volume )
    Parameters
    volume The current volume of the sound (ignoring attenuation due to position)
  • GetPitch Get the pitch of the current sound.

    float GetPitch ( ) const
    Returns
    1.0 if the pitch is unchanged. between 0.5 and 1.0 is lower, and between 1.0 and 2.0 is higher pitched
  • SetPitch Set the pitch of the current sound.

    void SetPitch ( float pitch )
    Parameters
    pitch 1.0 if the pitch is unchanged. between 0.5 and 1.0 is lower, and between 1.0 and 2.0 is higher pitched
  • SetPriority Set the priority used by the sound system to determine which sounds get deactivated if not enough sound sources are available to play all sounds.

    void SetPriority ( INT32 priority )
    Parameters
    priority The priority to use for the sound. Higher values mean higher priority
  • GetPriority Get the priority used by the sound system to determine which sounds get deactivated if not enough sound sources are available to play all sounds.

    INT32 GetPriority ( ) const
    Returns
    Priority the priority to use for the sound. Higher values mean higher priority
  • GetLooping Get whether the sound will loop playback continously.

    bool GetLooping ( ) const
    Returns
    True if the sound should loop continously
  • SetLooping Set whether the sound will loop playback continously.

    void SetLooping ( bool looping )
    Parameters
    looping True if the sound should loop playback, false otherwise
    Returns
    Looping true if the sound should loop continously
  • Stop Stop the playing of the current playlist if it was playing or paused (resets playlist to the beginning aswell)

    void Stop ( )
  • Pause Pause the playing of the current playlist (if it was playing)

    void Pause ( )
  • Play Resume the playing of the current playlist (if it was paused or stopped)

    void Play ( )
  • IsStopped Determines if the playlist has stopped play

    bool IsStopped ( ) const
    Returns
    True if the playlist has stopped play
  • IsPaused Determines if the playlist has paused play

    bool IsPaused ( ) const
    Returns
    True if the playlist has paused play
  • IsPlaying Determines if the playlist is playing

    bool IsPlaying ( ) const
    Returns
    True if the playlist is playing
  • IsActive Returns true if the sound manager has culled this sound source

    bool IsActive ( ) const

ISoundManager Provides an interface for processing sounds in 3d space.

  • GetListenerPosition Determine the position of the listener (i.e.

    DirectX::XMFLOAT3 * GetListenerPosition ( )
    Returns
    The position of the listener (i.e. the player)
  • GetListenerVelocity Determine the velocity of the listener (i.e.

    DirectX::XMFLOAT3 * GetListenerVelocity ( )
    Returns
    The velocity of the listener (i.e. the player)
  • GetListenerOrientationForward Get the vector representing the forward direction of the listener (i.e.

    DirectX::XMFLOAT3 * GetListenerOrientationForward ( )
    Returns
    The vector representing the forward direction of the listener (i.e. the player)
  • GetListenerOrientationUp Get the vector representing the upward direction of the listener (i.e.

    DirectX::XMFLOAT3 * GetListenerOrientationUp ( )
    Returns
    The vector representing the upward direction of the listener (i.e. the player)
  • GetSoundVolume Get the master volume (0-1) All sounds volumes are relative to this setting.

    float GetSoundVolume ( ) const
    Returns
    The master volume
  • SetSoundVolume Set the master volume (0-1) All sounds volumes are relative to this setting.

    void SetSoundVolume ( float volume )
    Parameters
    volume The master volume
  • GetStreamVolume Get the master volume for streamed sounds (0-1) All streams volumes are relative to this setting.

    float GetStreamVolume ( ) const
    Returns
    The master stream volume
  • SetStreamVolume Set the master volume for streamed sounds (0-1) All streams volumes are relative to this setting.

    void SetStreamVolume ( float volume )
    Parameters
    volume The master stream volume
  • GetEnableAttenuation Get whether sounds should attenuate with thier distance from the listener.

    bool GetEnableAttenuation ( ) const
    Returns
    True if sounds should attenuate with thier distance from the listener
  • SetEnableAttenuation Set whether sounds should attenuate with thier distance from the listener.

    void SetEnableAttenuation ( bool enableAttenuation )
    Parameters
    enableAttenuation True if sounds should attenuate with thier distance from the listener
  • GetDopplerShiftFactor Get whether sounds will doppler shift based on thier relative velocity to the listener.

    float GetDopplerShiftFactor ( ) const
    Returns
    Whether sounds will doppler shift based on thier relative velocity to the listener
  • SetDopplerShiftFactor Set whether sounds will doppler shift based on thier relative velocity to the listener.

    void SetDopplerShiftFactor ( float dopplerShiftFactor )
    Parameters
    dopplerShiftFactor True if sounds should doppler shift based on thier relative velocity to the listener
  • GetSpeedOfSound Get the speed of sound used to calculate doppler shifting of sounds.

    float GetSpeedOfSound ( ) const
    Returns
    The speed of sound used to calculate doppler shifting of sounds
  • SetSpeedOfSound Set the speed of sound used to calculate doppler shifting of sounds.

    void SetSpeedOfSound ( float speedOfSound )
    Parameters
    speedOfSound The speed of sound used to calculate doppler shifting of sounds
  • CreateSound Create a sound by loading a file in the VFS into memory.

    MGDFError CreateSound ( IFile * file , INT32 priority , ISound ** sound )
    Parameters
    file The data source for the sound
    priority The priority of the sound (used to determine what should play if no free audio sources are available
    sound If the sound is created successfully, this will point to the created sound
    Returns
    MGDF_OK if the sound was created successfully, otherwise an error code will be returned
  • CreateSoundStream Create a sound stream from a file in the VFS.

    MGDFError CreateSoundStream ( IFile * file , ISoundStream ** stream )
    Parameters
    file The data source for the sound stream
    stream If the stream is created successfully, this will point to the created stream
    Returns
    MGDF_OK if the stream was created successfully, otherwise an error code will be returned

ISoundStream An audio stream.

Inherits from: IUnknown

  • GetName The name of the sound stream.

    const wchar_t * GetName ( ) const
    Returns
    The name of the sound stream
  • GetVolume Get the volume level (0-1)

    float GetVolume ( ) const
    Returns
    The volume level (0-1)
  • SetVolume Set the volume level (0-1)

    void SetVolume ( float volume )
    Parameters
    volume The volume level to set
  • GetPosition The position of playback in the stream (0 -> GetLength)

    UINT32 GetPosition ( )
    Returns
    The position of playback in the stream
  • GetLength The total length of the stream.

    UINT32 GetLength ( )
    Returns
    The total length of the stream
  • Stop Stop the playing of the current stream if it was playing or paused (resets it to the beginning aswell)

    void Stop ( )
  • Pause Pause the playing of the current stream (if it was playing)

    void Pause ( )
  • Play Resume the playing of the current playlist (if it was paused or stopped)

    MGDFError Play ( )
    Returns
    MGDF_OK if the sound could resume playing, otherwise returns an error code.
  • IsStopped Determines if the stream has stopped play

    bool IsStopped ( ) const
    Returns
    True if the stream has stopped play
  • IsPaused Determines if the stream has paused play

    bool IsPaused ( ) const
    Returns
    True if the stream has paused play
  • IsPlaying Determines if the stream is playing

    bool IsPlaying ( ) const
    Returns
    True if the stream is playing

IStatisticsManager Provides an interface for recording statistics during a game session. If the game has a statistics service configured, the stats log will be uploaded by the GamesManager at the end of a play session.

  • SaveStatistic Logs a statistic as a key/value pair.

    MGDFError SaveStatistic ( const char * name , const char * value )
    Parameters
    name The name of the statistic tracker key
    value The value of the statistic
    Returns
    MGDF_OK if the statistic could be saved, MGDF_ERR_INVALID_STATS_KEY if the statistic key was invalid due to containing a space character or being more than 255 characters in length, MGDF_ERR_INVALID_STATS_VALUE if the statistic value is more than 255 characters in length

ITimer Provides an interface to the hosts high resolution CPU timer.

  • GetCurrentTimeTicks Get the current system time in ticks.

    LARGE_INTEGER GetCurrentTimeTicks ( ) const
    Returns
    The current system time in ticks
  • GetTimerFrequency Get the current system timer frequency.

    LARGE_INTEGER GetTimerFrequency ( ) const
    Returns
    The current system timer frequency
  • ConvertDifferenceToSeconds Convert two system tick times into a duration in seconds.

    double ConvertDifferenceToSeconds ( LARGE_INTEGER newTime , LARGE_INTEGER oldTime ) const
    Parameters
    newTime The newer of the two times
    oldTime The older of the two times
    Returns
    The difference betweeen the two parameters converted into seconds
  • CreateCPUCounter Create a performance counter for profiling CPU time taken.

    MGDFError CreateCPUCounter ( const char * name , IPerformanceCounter ** counter )
    Parameters
    name The name of the counter
    counter Points to the created counter
    Returns
    MGDF_OK if the counter could be created, otherwise an error code is returned

IVirtualFileSystem Provides an interface for accessing the virtual filesystem, which is a fast read only interface to access game content files. The root MGDF virtual filesystem is mounted from the game/content folder.

  • GetFile Get the file/folder/archive in the specified logical directory.

    IFile * GetFile ( const wchar_t * logicalPath ) const
    Parameters
    logicalPath The vfs path to the file
    Returns
    The file/folder/archive in the specified logical directory. paths are delimited using the / character and names are case sensitive
  • GetRoot Get the root node of the virtual filesystem.

    IFile * GetRoot ( ) const
    Returns
    The root node of the virtual filesystem

Structs

AdaptorMode The display settings for a particular adaptor mode.

  • Width

    UINT32 Width
  • Height

    UINT32 Height
  • RefreshRateNumerator

    UINT32 RefreshRateNumerator
  • RefreshRateDenominator

    UINT32 RefreshRateDenominator

Version Contains the framework version information.

  • Major

    INT32 Major
  • Minor

    INT32 Minor
  • Build

    INT32 Build
  • Revision

    INT32 Revision

Enumerations

GamepadButton All the gamepad button types recognized by the input manager.

Values
GAMEPAD_DPAD_UP
GAMEPAD_DPAD_DOWN
GAMEPAD_DPAD_LEFT
GAMEPAD_DPAD_RIGHT
GAMEPAD_START
GAMEPAD_BACK
GAMEPAD_LEFT_THUMB
GAMEPAD_RIGHT_THUMB
GAMEPAD_LEFT_SHOULDER
GAMEPAD_RIGHT_SHOULDER
GAMEPAD_A
GAMEPAD_B
GAMEPAD_X
GAMEPAD_Y

LogLevel The logging levels available, LOG_ERROR is of the highest importance with LOG_HIGH messages being of the least importance.

Values
LOG_ERROR
LOG_LOW
LOG_MEDIUM
LOG_HIGH

MGDFError Various error codes returned by the MGDF API.

Values
MGDF_OK
MGDF_ERR_ERROR_ALLOCATING_BUFFER
MGDF_ERR_NO_FREE_SOURCES
MGDF_ERR_VORBIS_LIB_LOAD_FAILED
MGDF_ERR_INVALID_FORMAT
MGDF_ERR_INVALID_ARCHIVE_FILE
MGDF_ERR_CPU_TIMER_UNSUPPORTED
MGDF_ERR_INVALID_FILE
MGDF_ERR_NO_PENDING_SAVE
MGDF_ERR_INVALID_SAVE_NAME
MGDF_ERR_ARCHIVE_FILE_TOO_LARGE
MGDF_ERR_FILE_IN_USE
MGDF_ERR_BUFFER_TOO_SMALL
MGDF_ERR_FATAL
MGDF_ERR_IS_FOLDER
MGDF_ERR_GPU_TIMER_UNSUPPORTED
MGDF_ERR_INVALID_TIMER_NAME
MGDF_ERR_INVALID_JSON
MGDF_ERR_INVALID_PARAMETER
MGDF_ERR_AUDIO_INIT_FAILED
MGDF_ERR_INVALID_STATS_KEY
MGDF_ERR_INVALID_STATS_VALUE

Mouse This is represents all the various mouse buttons that are recognised by the input manager

Values
MOUSE_LEFT
MOUSE_RIGHT
MOUSE_MIDDLE