e2d::core::Utilities Class Reference
List of all members.
Detailed Description
Easy2D has a set of subsystems working together to help you run your game application. These subsystems are all singletons, but they may be accessed via these
Utilities for convenience. Also, in here are some static methods that were useful inside the engine, and may be useful for your application as well.
Member Function Documentation
void e2d::core::Utilities::GetTextFromFile |
( |
char ** |
text, |
|
|
const char * |
filename | |
|
) |
| | [static] |
Reads the whole text file and puts its contents into the char pointer passed as parameter. The resulting string is null-terminated.
- Parameters:
-
| text | Pointer to char where the contents of the file will be stored. |
| filename | Path to the text file. |
- Exceptions:
-
void e2d::core::Utilities::UnGZip |
( |
const char * |
from, |
|
|
int |
fromlen, |
|
|
const char * |
to, |
|
|
int |
maxlen | |
|
) |
| | [static] |
Inflates a gzip compressed string into another string. The "to" pointer must be already allocated, and you must inform its maximum size in bytes to the decompressing method.
- Note:
- This method uses zlib for decompression.
- Parameters:
-
| from | Compressed string. |
| fromlen | Compressed string length, in bytes. |
| to | Pointer to decompressed string, must be pre-allocated. |
| maxlen | Decompressed maximum string length, in bytes. |
- Exceptions:
-
| Exception | if any decompressing error occurs. See zlib.h for error descriptions. |