|
Open Game Engine 2D API
|
Functions | |
| void | OGE_Print (string sInfo) |
| Output text to console. | |
| string | OGE_IntToStr (int iValue) |
| Convert integer to string. | |
| int | OGE_StrToInt (string sValue) |
| Convert string to integer. | |
| int | OGE_HexToInt (string sValue) |
| Convert hexadecimal string to integer. | |
| string | OGE_FloatToStr (double fValue) |
| Convert a floating-point value to a string. | |
| double | OGE_StrToFloat (string sValue) |
| Convert a string value to a floating-point value. | |
| string | OGE_TrimStr (string sText) |
| Trim the string value. | |
| int | OGE_GetTicks () |
| Retrieves the number of milliseconds that have elapsed since the system was started. | |
| int | OGE_GetOS () |
| Get the type of current OS. | |
| string | OGE_GetDateTimeStr () |
| Get the string format of current date time. | |
| bool | OGE_GetDateTime (int &year, int &month, int &day, int &hour, int &min, int &sec) |
| Get current date time. | |
| void | OGE_Delay (int iMilliSeconds) |
| Waits a specified number of milliseconds before returning. | |
| int | OGE_Random (int iMax) |
| Get an integer random value in some range (greater than or equal to zero) | |
| double | OGE_RandomFloat () |
| Get a float-pointing random value between 0 and 1. | |
| int | OGE_MakeColor (int iRed, int iGreen, int iBlue) |
| Map a RGB color value to a pixel format. | |
| string | OGE_GetDefaultCharset () |
| Get the default charset of the game. | |
| void | OGE_SetDefaultCharset (string sCharsetName) |
| Set the default charset. | |
| string | OGE_GetSystemCharset () |
| Get the charset of the OS. | |
| void | OGE_SetSystemCharset (string sCharsetName) |
| Tell the game engine the name of the charset used by the OS. | |
| bool | OGE_IsInputUnicode () |
| Check if current input text is unicode or not. | |
| int | OGE_StrToUnicode (string sText, string sCharsetName, int iBufferId) |
| Convert string to unicode. | |
| string | OGE_UnicodeToStr (int iUnicodeBufferId, int iBufferSize, string sCharsetName) |
| Convert unicode to string. | |
| int | OGE_StrLen (string sText) |
| Get the length of the string. | |
| int | OGE_FindStr (string sText, string sSubText, int iStartPos) |
| Find the position of a sub string in some string. | |
| string | OGE_CopyStr (string sText, int iStartPos, int iCount) |
| Copy a sub string from some string. | |
| string | OGE_DeleteStr (string sText, int iStartPos, int iCount) |
| Delete a sub string from some string. | |
| string | OGE_ReplaceStr (string sText, string sOldSubText, string sNewSubText) |
| Replace all occurrences of substring with another one. | |
| string OGE_CopyStr | ( | string | sText, |
| int | iStartPos, | ||
| int | iCount | ||
| ) |
Copy a sub string from some string.
| [in] | sText | The string |
| [in] | iStartPos | The starting position |
| [in] | iCount | The length of the sub string |
| void OGE_Delay | ( | int | iMilliSeconds | ) |
Waits a specified number of milliseconds before returning.
| [in] | iMilliSeconds | The number of milliseconds |
| string OGE_DeleteStr | ( | string | sText, |
| int | iStartPos, | ||
| int | iCount | ||
| ) |
Delete a sub string from some string.
| [in] | sText | The string |
| [in] | iStartPos | The starting position |
| [in] | iCount | The number of the characters will be deleted |
| int OGE_FindStr | ( | string | sText, |
| string | sSubText, | ||
| int | iStartPos | ||
| ) |
Find the position of a sub string in some string.
| [in] | sText | The string |
| [in] | sSubText | The sub string |
| [in] | iStartPos | Specify the position to begin searching |
| string OGE_FloatToStr | ( | double | fValue | ) |
Convert a floating-point value to a string.
| [in] | fValue | The floating-point value |
| bool OGE_GetDateTime | ( | int & | year, |
| int & | month, | ||
| int & | day, | ||
| int & | hour, | ||
| int & | min, | ||
| int & | sec | ||
| ) |
Get current date time.
| [out] | year | The year of current date time |
| [out] | month | The month of current date time |
| [out] | day | The day of current date time |
| [out] | hour | The hour of current date time |
| [out] | min | The minute of current date time |
| [out] | sec | The second of current date time |
| string OGE_GetDateTimeStr | ( | ) |
Get the string format of current date time.
| string OGE_GetDefaultCharset | ( | ) |
Get the default charset of the game.
| int OGE_GetOS | ( | ) |
Get the type of current OS.
| string OGE_GetSystemCharset | ( | ) |
Get the charset of the OS.
| int OGE_GetTicks | ( | ) |
Retrieves the number of milliseconds that have elapsed since the system was started.
| int OGE_HexToInt | ( | string | sValue | ) |
Convert hexadecimal string to integer.
| [in] | sValue | The hexadecimal string |
| string OGE_IntToStr | ( | int | iValue | ) |
Convert integer to string.
| [in] | iValue | The integer value |
| bool OGE_IsInputUnicode | ( | ) |
Check if current input text is unicode or not.
| int OGE_MakeColor | ( | int | iRed, |
| int | iGreen, | ||
| int | iBlue | ||
| ) |
Map a RGB color value to a pixel format.
| [in] | iRed | The red value |
| [in] | iGreen | The green value |
| [in] | iBlue | The blue value |
| void OGE_Print | ( | string | sInfo | ) |
Output text to console.
| [in] | sInfo | The output text |
| int OGE_Random | ( | int | iMax | ) |
Get an integer random value in some range (greater than or equal to zero)
| [in] | iMax | The max value of the random number |
| double OGE_RandomFloat | ( | ) |
Get a float-pointing random value between 0 and 1.
| string OGE_ReplaceStr | ( | string | sText, |
| string | sOldSubText, | ||
| string | sNewSubText | ||
| ) |
Replace all occurrences of substring with another one.
| [in] | sText | The string |
| [in] | sOldSubText | The substring to search for replacing |
| [in] | sNewSubText | The substitution substring |
| void OGE_SetDefaultCharset | ( | string | sCharsetName | ) |
Set the default charset.
| [in] | sCharsetName | The name of the default charset |
| void OGE_SetSystemCharset | ( | string | sCharsetName | ) |
Tell the game engine the name of the charset used by the OS.
| [in] | sCharsetName | The name of the charset |
| int OGE_StrLen | ( | string | sText | ) |
Get the length of the string.
| [in] | sText | The string |
| double OGE_StrToFloat | ( | string | sValue | ) |
Convert a string value to a floating-point value.
| [in] | sValue | The string value |
| int OGE_StrToInt | ( | string | sValue | ) |
Convert string to integer.
| [in] | sValue | The string value |
| int OGE_StrToUnicode | ( | string | sText, |
| string | sCharsetName, | ||
| int | iBufferId | ||
| ) |
Convert string to unicode.
| [in] | sText | The string |
| [in] | sCharsetName | Charset of the string |
| [in] | iBufferId | The ID of the buffer where the unicode output will be stored |
| string OGE_TrimStr | ( | string | sText | ) |
Trim the string value.
| [in] | sText | The input string |
| string OGE_UnicodeToStr | ( | int | iUnicodeBufferId, |
| int | iBufferSize, | ||
| string | sCharsetName | ||
| ) |
Convert unicode to string.
| [in] | iUnicodeBufferId | The ID of the buffer where the unicode string lies |
| [in] | iBufferSize | The size of the buffer |
| [in] | sCharsetName | The charset of the output string |
1.8.0