1 /**
2  * zziplib data source for SDL_RWops
3 
4  * Copyright (C) 2001  Guido Draheim <guidod@gmx.de>
5 
6  * This file is part of GNU FreeDink
7 
8  * GNU FreeDink is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 3 of the
11  * License, or (at your option) any later version.
12 
13  * GNU FreeDink is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17 
18  * You should have received a copy of the GNU General Public License
19  * along with this program.  If not, see
20  * <http://www.gnu.org/licenses/>.
21  */
22 
23 /*
24  *      You should be able to drop it in the place of a SDL_RWFromFile. Then
25  *      go to X/share/myapp and do `cd graphics && zip -9r ../graphics.zip .`
26  *      and rename the graphics/ subfolder - and still all your files
27  *      are found: a filepath like X/shared/graphics/game/greetings.bmp
28  *      will open X/shared/graphics.zip and return the zipped file
29  *      game/greetings.bmp in the zip-archive (for reading that is).
30  *
31  */
32 
33 #ifndef _SDL_RWops_ZZIP_h
34 #define _SDL_RWops_ZZIP_h
35 
36 #include <SDL_rwops.h>
37 
38 #ifndef ZZIP_NO_DECLSPEC
39 #define ZZIP_DECLSPEC
40 #else /* use DECLSPEC from SDL/begin_code.h */
41 #define ZZIP_DECLSPEC DECLSPEC
42 #endif
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 extern ZZIP_DECLSPEC
49 SDL_RWops *SDL_RWFromZZIP(const char* file, const char* mode);
50 
51 #ifdef __cplusplus
52 } /* extern C */
53 #endif
54 
55 #endif
56