Open Game Engine 2D API
 All Functions Variables
Functions
Data

Functions

int OGE_GetIntVar (int iDataId, int iIndex)
 Get the value of an integer variable in the data.
void OGE_SetIntVar (int iDataId, int iIndex, int iValue)
 Set value to an integer variable in the data.
double OGE_GetFloatVar (int iDataId, int iIndex)
 Get the value of a floating-point variable in the data.
void OGE_SetFloatVar (int iDataId, int iIndex, double fValue)
 Set value to a floating-point variable in the data.
string OGE_GetStrVar (int iDataId, int iIndex)
 Get the value of a string variable in the data.
void OGE_SetStrVar (int iDataId, int iIndex, string sValue)
 Set value to a string variable in the data.
int OGE_GetBufVar (int iDataId, int iIndex)
 Get the value of a buffer variable in the data.
void OGE_SetBufVar (int iDataId, int iIndex, string sValue)
 Set a string value to a buffer variable in the data.
int OGE_GetIntVarCount (int iDataId)
 Get the count of the integer variables in the data.
void OGE_SetIntVarCount (int iDataId, int iCount)
 Set the count of the integer variables in the data.
int OGE_GetFloatVarCount (int iDataId)
 Get the count of the floating-point variables in the data.
void OGE_SetFloatVarCount (int iDataId, int iCount)
 Set the count of the floating-point variables in the data.
int OGE_GetStrVarCount (int iDataId)
 Get the count of the string variables in the data.
void OGE_SetStrVarCount (int iDataId, int iCount)
 Set the count of the string variables in the data.
int OGE_GetBufVarCount (int iDataId)
 Get the count of the buffer variables in the data.
void OGE_SetBufVarCount (int iDataId, int iCount)
 Set the count of the buffer variables in the data.
void OGE_SortIntVar (int iDataId)
 Sort the integer variables in the data.
void OGE_SortFloatVar (int iDataId)
 Sort the floating-point variables in the data.
void OGE_SortStrVar (int iDataId)
 Sort the string variables in the data.
int OGE_FindIntVar (int iDataId, int iValue)
 Find the integer variable in the data.
int OGE_FindFloatVar (int iDataId, double fValue)
 Find the floating-point variable in the data.
int OGE_FindStrVar (int iDataId, string sValue)
 Find the string variable in the data.
int OGE_SplitStrIntoData (string sStr, string sDelim, int iDataId)
 Split a string into some string variables in the data.
int OGE_FindGameData (string sGameDataName)
 Find the data by name.
int OGE_GetGameData (string sGameDataName, string sTemplateName)
 Copy a data from a template.
string OGE_GetGameDataName (int iGameDataId)
 Get the name of the data.
int OGE_GetCustomGameData (string sGameDataName, int iIntCount, int iFloatCount, int iStrCount)
 Get a custom data.
void OGE_CopyGameData (int iFromGameDataId, int iToGameDataId)
 Data copy.
void OGE_RemoveGameData (string sName)
 Remove a data object by name.

Function Documentation

void OGE_CopyGameData ( int  iFromGameDataId,
int  iToGameDataId 
)

Data copy.

Parameters:
[in]iFromGameDataIdThe ID of the source data
[in]iToGameDataIdThe ID of the target data
int OGE_FindFloatVar ( int  iDataId,
double  fValue 
)

Find the floating-point variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]fValueThe value of the floating-point variable
Returns:
The index of the floating-point variable
int OGE_FindGameData ( string  sGameDataName)

Find the data by name.

Parameters:
[in]sGameDataNameThe name of the data
Returns:
The ID of the data
int OGE_FindIntVar ( int  iDataId,
int  iValue 
)

Find the integer variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iValueThe value of the integer variable
Returns:
The index of the integer variable
int OGE_FindStrVar ( int  iDataId,
string  sValue 
)

Find the string variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]sValueThe value of the string variable
Returns:
The index of the string variable
int OGE_GetBufVar ( int  iDataId,
int  iIndex 
)

Get the value of a buffer variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iIndexThe index of the buffer variable
Returns:
The ID of the buffer variable
int OGE_GetBufVarCount ( int  iDataId)

Get the count of the buffer variables in the data.

Parameters:
[in]iDataIdThe ID of the data
Returns:
The count of the buffer variables
int OGE_GetCustomGameData ( string  sGameDataName,
int  iIntCount,
int  iFloatCount,
int  iStrCount 
)

Get a custom data.

Parameters:
[in]sGameDataNameThe name of the data
[in]iIntCountThe count of the integer variables of the data
[in]iFloatCountThe count of the float variables of the data
[in]iStrCountThe count of the string variables of the data
Returns:
The ID of the data
double OGE_GetFloatVar ( int  iDataId,
int  iIndex 
)

Get the value of a floating-point variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iIndexThe index of the floating-point variable
Returns:
The value of the floating-point variable
int OGE_GetFloatVarCount ( int  iDataId)

Get the count of the floating-point variables in the data.

Parameters:
[in]iDataIdThe ID of the data
Returns:
The count of the floating-point variables
int OGE_GetGameData ( string  sGameDataName,
string  sTemplateName 
)

Copy a data from a template.

Parameters:
[in]sGameDataNameThe name of the new data
[in]sTemplateNameThe name of the template data
Returns:
The ID of the new data
string OGE_GetGameDataName ( int  iGameDataId)

Get the name of the data.

Parameters:
[in]iGameDataIdThe ID of the data
Returns:
The name of the data
int OGE_GetIntVar ( int  iDataId,
int  iIndex 
)

Get the value of an integer variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iIndexThe index of the integer variable
Returns:
The value of the integer variable
int OGE_GetIntVarCount ( int  iDataId)

Get the count of the integer variables in the data.

Parameters:
[in]iDataIdThe ID of the data
Returns:
The count of the integer variables
string OGE_GetStrVar ( int  iDataId,
int  iIndex 
)

Get the value of a string variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iIndexThe index of the string variable
Returns:
The value of the string variable
int OGE_GetStrVarCount ( int  iDataId)

Get the count of the string variables in the data.

Parameters:
[in]iDataIdThe ID of the data
Returns:
The count of the string variables
void OGE_RemoveGameData ( string  sName)

Remove a data object by name.

Parameters:
[in]sNameThe name of the data
void OGE_SetBufVar ( int  iDataId,
int  iIndex,
string  sValue 
)

Set a string value to a buffer variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iIndexThe index of the buffer variable
[in]sValueThe string value used to fill the buffer
void OGE_SetBufVarCount ( int  iDataId,
int  iCount 
)

Set the count of the buffer variables in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iCountThe count of the buffer variables
void OGE_SetFloatVar ( int  iDataId,
int  iIndex,
double  fValue 
)

Set value to a floating-point variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iIndexThe index of the floating-point variable
[in]fValueThe value of the floating-point variable
void OGE_SetFloatVarCount ( int  iDataId,
int  iCount 
)

Set the count of the floating-point variables in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iCountThe count of the floating-point variables
void OGE_SetIntVar ( int  iDataId,
int  iIndex,
int  iValue 
)

Set value to an integer variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iIndexThe index of the integer variable
[in]iValueThe value of the integer variable
void OGE_SetIntVarCount ( int  iDataId,
int  iCount 
)

Set the count of the integer variables in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iCountThe count of the integer variables
void OGE_SetStrVar ( int  iDataId,
int  iIndex,
string  sValue 
)

Set value to a string variable in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iIndexThe index of the string variable
[in]sValueThe value of the string variable
void OGE_SetStrVarCount ( int  iDataId,
int  iCount 
)

Set the count of the string variables in the data.

Parameters:
[in]iDataIdThe ID of the data
[in]iCountThe count of the string variables
void OGE_SortFloatVar ( int  iDataId)

Sort the floating-point variables in the data.

Parameters:
[in]iDataIdThe ID of the data
void OGE_SortIntVar ( int  iDataId)

Sort the integer variables in the data.

Parameters:
[in]iDataIdThe ID of the data
void OGE_SortStrVar ( int  iDataId)

Sort the string variables in the data.

Parameters:
[in]iDataIdThe ID of the data
int OGE_SplitStrIntoData ( string  sStr,
string  sDelim,
int  iDataId 
)

Split a string into some string variables in the data.

Parameters:
[in]sStrThe main string for splitting
[in]sDelimThe delimiter
[in]iDataIdThe ID of the data which will store the parts of the main string
Returns:
The count of the parts after splitting