Open Game Engine 2D API
 All Functions Variables
Functions
Game

Functions

string OGE_GetGameMainDir ()
 Get the root directory of current game.
void OGE_LockCPS (int iCPS)
 Lock the CPS (cycles per second)
int OGE_GetCPS ()
 Get current CPS (cycles per second)
int OGE_GetLockedCPS ()
 Get the CPS (cycles per second) you want to lock.
int OGE_GetPlayerSpr (int iPlayerId)
 Get the player sprite of the whole game.
void OGE_SetPlayerSpr (int iSprId, int iPlayerId)
 Set the player sprite of the whole game.
int OGE_GetUserSpr (int idx)
 Get the user sprite by index.
void OGE_SetUserSpr (int iSprId, int idx)
 Set the user sprite with index.
int OGE_GetUserGroup (int idx)
 Get the user group by index.
void OGE_SetUserGroup (int iSprGroupId, int idx)
 Set the user group with index.
int OGE_GetUserPath (int idx)
 Get the user path by index.
void OGE_SetUserPath (int iSprPathId, int idx)
 Set the user path with index.
int OGE_GetUserImage (int idx)
 Get user image by index.
void OGE_SetUserImage (int iImageId, int idx)
 Set user image with index.
int OGE_GetUserData (int idx)
 Get user data by index.
void OGE_SetUserData (int iDataId, int idx)
 Set user data with index.
int OGE_GetUserObject (int idx)
 Get the user object by index.
void OGE_SetUserObject (int iObjId, int idx)
 Set the user object with index.
void OGE_PauseGame ()
 Pause the game.
void OGE_ResumeGame ()
 Resume the game.
bool OGE_IsPlayingGame ()
 Check if the game is running or not.
int OGE_QuitGame ()
 Quit the game.
int OGE_GetAppCustomData ()
 Get the custom data of the game.
void OGE_SetAppCustomData (int iGameDataId)
 Set the custom data of the game.
int OGE_GetAppGameData ()
 Get the default data of the game.

Function Documentation

Get the custom data of the game.

Returns:
The ID of the data

Get the default data of the game.

Returns:
The ID of the data
int OGE_GetCPS ( )

Get current CPS (cycles per second)

Returns:
Current CPS (cycles per second)
string OGE_GetGameMainDir ( )

Get the root directory of current game.

Returns:
The root directory

Get the CPS (cycles per second) you want to lock.

Returns:
The CPS (cycles per second) you want to lock
int OGE_GetPlayerSpr ( int  iPlayerId)

Get the player sprite of the whole game.

Parameters:
[in]iPlayerIdThe ID of the player
Returns:
The ID of the sprite
int OGE_GetUserData ( int  idx)

Get user data by index.

Parameters:
[in]idxThe index
Returns:
The ID of the data
int OGE_GetUserGroup ( int  idx)

Get the user group by index.

Parameters:
[in]idxThe index
Returns:
The ID of the group
int OGE_GetUserImage ( int  idx)

Get user image by index.

Parameters:
[in]idxThe index
Returns:
The ID of the image
int OGE_GetUserObject ( int  idx)

Get the user object by index.

Parameters:
[in]idxThe index
Returns:
The ID of the object
int OGE_GetUserPath ( int  idx)

Get the user path by index.

Parameters:
[in]idxThe index
Returns:
The ID of the path
int OGE_GetUserSpr ( int  idx)

Get the user sprite by index.

Parameters:
[in]idxThe index of the user sprite
Returns:
The ID of the user sprite

Check if the game is running or not.

Returns:
Returns true if the game is running
void OGE_LockCPS ( int  iCPS)

Lock the CPS (cycles per second)

Parameters:
[in]iCPSThe CPS value you want to lock
int OGE_QuitGame ( )

Quit the game.

Returns:
Returns 0 if succeed
void OGE_SetAppCustomData ( int  iGameDataId)

Set the custom data of the game.

Parameters:
[in]iGameDataIdThe ID of the data
void OGE_SetPlayerSpr ( int  iSprId,
int  iPlayerId 
)

Set the player sprite of the whole game.

Parameters:
[in]iSprIdThe ID of the sprite
[in]iPlayerIdThe ID of the player
void OGE_SetUserData ( int  iDataId,
int  idx 
)

Set user data with index.

Parameters:
[in]iDataIdThe ID of the data
[in]idxThe index
void OGE_SetUserGroup ( int  iSprGroupId,
int  idx 
)

Set the user group with index.

Parameters:
[in]iSprGroupIdThe ID of the group
[in]idxThe index
void OGE_SetUserImage ( int  iImageId,
int  idx 
)

Set user image with index.

Parameters:
[in]iImageIdThe ID of the image
[in]idxThe index
void OGE_SetUserObject ( int  iObjId,
int  idx 
)

Set the user object with index.

Parameters:
[in]iObjIdThe ID of the object
[in]idxThe index
void OGE_SetUserPath ( int  iSprPathId,
int  idx 
)

Set the user path with index.

Parameters:
[in]iSprPathIdThe ID of the path
[in]idxThe index
void OGE_SetUserSpr ( int  iSprId,
int  idx 
)

Set the user sprite with index.

Parameters:
[in]iSprIdThe ID of the sprite
[in]idxThe index