Open Game Engine 2D API
|
Functions | |
int | OGE_FileSize (string sFileName) |
Get the size of a file. | |
bool | OGE_FileExists (string sFileName) |
Check if the file exists or not. | |
bool | OGE_CreateEmptyFile (string sFileName) |
Create an empty file. | |
bool | OGE_RemoveFile (string sFileName) |
Remove a file. | |
int | OGE_OpenFile (string sFileName, bool bTryCreate) |
Open a file. | |
int | OGE_CloseFile (int iFileId) |
Close a file. | |
int | OGE_SaveFile (int iFileId) |
Save a file. | |
bool | OGE_GetFileEof (int iFileId) |
Check if it has reached the end of the file. | |
int | OGE_GetFileReadPos (int iFileId) |
Get current reading position of the file. | |
int | OGE_SetFileReadPos (int iFileId, int iPos) |
Set current reading position of the file. | |
int | OGE_SetFileReadPosFromEnd (int iFileId, int iPos) |
Set current reading position by setting the position(offset) relative to the end of the file. | |
int | OGE_GetFileWritePos (int iFileId) |
Get current writing position of the file. | |
int | OGE_SetFileWritePos (int iFileId, int iPos) |
Set current writing position of the file. | |
int | OGE_SetFileWritePosFromEnd (int iFileId, int iPos) |
Set current writing position by setting the position(offset) relative to the end of the file. | |
char | OGE_ReadFileByte (int iFileId) |
Read a byte from the file. | |
int | OGE_ReadFileInt (int iFileId) |
Read an integer from the file. | |
double | OGE_ReadFileFloat (int iFileId) |
Read a floating-point value from the file. | |
int | OGE_ReadFileBuf (int iFileId, int iLen, int iBufId) |
Copy bytes from the file to a buffer. | |
string | OGE_ReadFileStr (int iFileId, int iLen) |
Read a string from the file. | |
int | OGE_WriteFileByte (int iFileId, char value) |
Write a byte into the file. | |
int | OGE_WriteFileInt (int iFileId, int value) |
Write an integer into the file. | |
int | OGE_WriteFileFloat (int iFileId, double value) |
Write a floating-point value into the file. | |
int | OGE_WriteFileBuf (int iFileId, int buf, int len) |
Copy bytes from a buffer to the file. | |
int | OGE_WriteFileStr (int iFileId, string value) |
Write a string into the file. |
int OGE_CloseFile | ( | int | iFileId | ) |
Close a file.
[in] | iFileId | The ID of the file |
bool OGE_CreateEmptyFile | ( | string | sFileName | ) |
Create an empty file.
[in] | sFileName | The file path |
bool OGE_FileExists | ( | string | sFileName | ) |
Check if the file exists or not.
[in] | sFileName | The file path |
int OGE_FileSize | ( | string | sFileName | ) |
Get the size of a file.
[in] | sFileName | The file path |
bool OGE_GetFileEof | ( | int | iFileId | ) |
Check if it has reached the end of the file.
[in] | iFileId | The ID of the file |
int OGE_GetFileReadPos | ( | int | iFileId | ) |
Get current reading position of the file.
[in] | iFileId | The ID of the file |
int OGE_GetFileWritePos | ( | int | iFileId | ) |
Get current writing position of the file.
[in] | iFileId | The ID of the file |
int OGE_OpenFile | ( | string | sFileName, |
bool | bTryCreate | ||
) |
Open a file.
[in] | sFileName | The file path |
[in] | bTryCreate | Create or not if the file does not exist |
int OGE_ReadFileBuf | ( | int | iFileId, |
int | iLen, | ||
int | iBufId | ||
) |
Copy bytes from the file to a buffer.
[in] | iFileId | The ID of the file |
[in] | iLen | The count of the bytes |
[in] | iBufId | The ID of the buffer |
char OGE_ReadFileByte | ( | int | iFileId | ) |
Read a byte from the file.
[in] | iFileId | The ID of the file |
double OGE_ReadFileFloat | ( | int | iFileId | ) |
Read a floating-point value from the file.
[in] | iFileId | The ID of the file |
int OGE_ReadFileInt | ( | int | iFileId | ) |
Read an integer from the file.
[in] | iFileId | The ID of the file |
string OGE_ReadFileStr | ( | int | iFileId, |
int | iLen | ||
) |
Read a string from the file.
[in] | iFileId | The ID of the file |
[in] | iLen | The length of the string |
bool OGE_RemoveFile | ( | string | sFileName | ) |
Remove a file.
[in] | sFileName | The file path |
int OGE_SaveFile | ( | int | iFileId | ) |
Save a file.
[in] | iFileId | The ID of the file |
int OGE_SetFileReadPos | ( | int | iFileId, |
int | iPos | ||
) |
Set current reading position of the file.
[in] | iFileId | The ID of the file |
[in] | iPos | The reading position |
int OGE_SetFileReadPosFromEnd | ( | int | iFileId, |
int | iPos | ||
) |
Set current reading position by setting the position(offset) relative to the end of the file.
[in] | iFileId | The ID of the file |
[in] | iPos | The position relative to the end of the file |
int OGE_SetFileWritePos | ( | int | iFileId, |
int | iPos | ||
) |
Set current writing position of the file.
[in] | iFileId | The ID of the file |
[in] | iPos | The writing position |
int OGE_SetFileWritePosFromEnd | ( | int | iFileId, |
int | iPos | ||
) |
Set current writing position by setting the position(offset) relative to the end of the file.
[in] | iFileId | The ID of the file |
[in] | iPos | The position relative to the end of the file |
int OGE_WriteFileBuf | ( | int | iFileId, |
int | buf, | ||
int | len | ||
) |
Copy bytes from a buffer to the file.
[in] | iFileId | The ID of the file |
[in] | buf | The ID of the buffer |
[in] | len | The count of the bytes |
int OGE_WriteFileByte | ( | int | iFileId, |
char | value | ||
) |
Write a byte into the file.
[in] | iFileId | The ID of the file |
[in] | value | The value of the byte |
int OGE_WriteFileFloat | ( | int | iFileId, |
double | value | ||
) |
Write a floating-point value into the file.
[in] | iFileId | The ID of the file |
[in] | value | The floating-point value |
int OGE_WriteFileInt | ( | int | iFileId, |
int | value | ||
) |
Write an integer into the file.
[in] | iFileId | The ID of the file |
[in] | value | The value of the integer |
int OGE_WriteFileStr | ( | int | iFileId, |
string | value | ||
) |
Write a string into the file.
[in] | iFileId | The ID of the file |
[in] | value | The string |