|
World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
|
Классы | |
| struct | SDL_RWops |
Определения типов | |
| typedef struct SDL_RWops | SDL_RWops |
Функции | |
RWFrom functions | |
Functions to create SDL_RWops structures from various data streams. | |
| DECLSPEC SDL_RWops *SDLCALL | SDL_RWFromFile (const char *file, const char *mode) |
| DECLSPEC SDL_RWops *SDLCALL | SDL_RWFromFP (FILE *fp, SDL_bool autoclose) |
| DECLSPEC SDL_RWops *SDLCALL | SDL_RWFromFP (void *fp, SDL_bool autoclose) |
| DECLSPEC SDL_RWops *SDLCALL | SDL_RWFromMem (void *mem, int size) |
| DECLSPEC SDL_RWops *SDLCALL | SDL_RWFromConstMem (const void *mem, int size) |
| DECLSPEC SDL_RWops *SDLCALL | SDL_AllocRW (void) |
| DECLSPEC void SDLCALL | SDL_FreeRW (SDL_RWops *area) |
| DECLSPEC Sint64 SDLCALL | SDL_RWsize (SDL_RWops *context) |
| DECLSPEC Sint64 SDLCALL | SDL_RWseek (SDL_RWops *context, Sint64 offset, int whence) |
| DECLSPEC Sint64 SDLCALL | SDL_RWtell (SDL_RWops *context) |
| DECLSPEC size_t SDLCALL | SDL_RWread (SDL_RWops *context, void *ptr, size_t size, size_t maxnum) |
| DECLSPEC size_t SDLCALL | SDL_RWwrite (SDL_RWops *context, const void *ptr, size_t size, size_t num) |
| DECLSPEC int SDLCALL | SDL_RWclose (SDL_RWops *context) |
| DECLSPEC void *SDLCALL | SDL_LoadFile_RW (SDL_RWops *src, size_t *datasize, int freesrc) |
| DECLSPEC void *SDLCALL | SDL_LoadFile (const char *file, size_t *datasize) |
Read endian functions | |
Read an item of the specified endianness and return in native format. | |
| DECLSPEC Uint8 SDLCALL | SDL_ReadU8 (SDL_RWops *src) |
| DECLSPEC Uint16 SDLCALL | SDL_ReadLE16 (SDL_RWops *src) |
| DECLSPEC Uint16 SDLCALL | SDL_ReadBE16 (SDL_RWops *src) |
| DECLSPEC Uint32 SDLCALL | SDL_ReadLE32 (SDL_RWops *src) |
| DECLSPEC Uint32 SDLCALL | SDL_ReadBE32 (SDL_RWops *src) |
| DECLSPEC Uint64 SDLCALL | SDL_ReadLE64 (SDL_RWops *src) |
| DECLSPEC Uint64 SDLCALL | SDL_ReadBE64 (SDL_RWops *src) |
Write endian functions | |
Write an item of native format to the specified endianness. | |
| DECLSPEC size_t SDLCALL | SDL_WriteU8 (SDL_RWops *dst, Uint8 value) |
| DECLSPEC size_t SDLCALL | SDL_WriteLE16 (SDL_RWops *dst, Uint16 value) |
| DECLSPEC size_t SDLCALL | SDL_WriteBE16 (SDL_RWops *dst, Uint16 value) |
| DECLSPEC size_t SDLCALL | SDL_WriteLE32 (SDL_RWops *dst, Uint32 value) |
| DECLSPEC size_t SDLCALL | SDL_WriteBE32 (SDL_RWops *dst, Uint32 value) |
| DECLSPEC size_t SDLCALL | SDL_WriteLE64 (SDL_RWops *dst, Uint64 value) |
| DECLSPEC size_t SDLCALL | SDL_WriteBE64 (SDL_RWops *dst, Uint64 value) |
This file provides a general interface for SDL to read and write data streams. It can easily be extended to files, memory, etc.
См. определение в файле SDL_rwops.h
| DECLSPEC SDL_RWops* SDLCALL SDL_RWFromFile | ( | const char * | file, |
| const char * | mode | ||
| ) |
Return the size of the file in this rwops, or -1 if unknown
Seek to offset relative to whence, one of stdio's whence values: RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
Return the current offset in the data stream, or -1 on error.
Read up to maxnum objects each of size size from the data stream to the area pointed at by ptr.
| DECLSPEC size_t SDLCALL SDL_RWwrite | ( | SDL_RWops * | context, |
| const void * | ptr, | ||
| size_t | size, | ||
| size_t | num | ||
| ) |
Write exactly num objects each of size size from the area pointed at by ptr to data stream.
| DECLSPEC int SDLCALL SDL_RWclose | ( | SDL_RWops * | context | ) |
Close and free an allocated SDL_RWops structure.
Load all the data from an SDL data stream.
The data is allocated with a zero byte at the end (null terminated)
If datasize is not NULL, it is filled with the size of the data read.
If freesrc is non-zero, the stream will be closed after being read.
The data should be freed with SDL_free().
Load an entire file.
The data is allocated with a zero byte at the end (null terminated)
If datasize is not NULL, it is filled with the size of the data read.
If freesrc is non-zero, the stream will be closed after being read.
The data should be freed with SDL_free().