| 1 |
/* |
| 2 |
* Copyright (c) 2001 Guido Draheim <[email protected]> |
| 3 |
* Use freely under the restrictions of the ZLIB License |
| 4 |
* |
| 5 |
* You should be able to drop it in the place of a SDL_RWFromFile. Then |
| 6 |
* go to X/share/myapp and do `cd graphics && zip -9r ../graphics.zip .` |
| 7 |
* and rename the graphics/ subfolder - and still all your files |
| 8 |
* are found: a filepath like X/shared/graphics/game/greetings.bmp |
| 9 |
* will open X/shared/graphics.zip and return the zipped file |
| 10 |
* game/greetings.bmp in the zip-archive (for reading that is). |
| 11 |
* |
| 12 |
*/ |
| 13 |
|
| 14 |
#ifndef _SDL_RWops_ZZIP_h |
| 15 |
#define _SDL_RWops_ZZIP_h |
| 16 |
|
| 17 |
#include <SDL_rwops.h> |
| 18 |
|
| 19 |
#ifndef ZZIP_NO_DECLSPEC |
| 20 |
#define ZZIP_DECLSPEC |
| 21 |
#else /* use DECLSPEC from SDL/begin_code.h */ |
| 22 |
#define ZZIP_DECLSPEC DECLSPEC |
| 23 |
#endif |
| 24 |
|
| 25 |
#ifdef __cplusplus |
| 26 |
extern "C" { |
| 27 |
#endif |
| 28 |
|
| 29 |
extern ZZIP_DECLSPEC |
| 30 |
SDL_RWops *SDL_RWFromZZIP(const char* file, const char* mode); |
| 31 |
|
| 32 |
#ifdef __cplusplus |
| 33 |
} /* extern C */ |
| 34 |
#endif |
| 35 |
|
| 36 |
#endif |