1 //=============================================================================
2 //
3 // Adventure Game Studio (AGS)
4 //
5 // Copyright (C) 1999-2011 Chris Jones and 2011-20xx others
6 // The full list of copyright holders can be found in the Copyright.txt
7 // file, which is part of this source code distribution.
8 //
9 // The AGS source code is provided under the Artistic License 2.0.
10 // A copy of this license can be found in the file License.txt and at
11 // http://www.opensource.org/licenses/artistic-license-2.0.php
12 //
13 //=============================================================================
14 
15 #ifndef __AC_COMPRESS_H
16 #define __AC_COMPRESS_H
17 
18 #include <stdio.h>
19 #include "util/wgt2allg.h" // color (allegro RGB)
20 
21 namespace AGS { namespace Common { class Stream; class Bitmap; } }
22 using namespace AGS; // FIXME later
23 
24 // MACPORT FIX 9/6/05: removed far and put space after *
25 #ifdef __block
26 #undef __block
27 #endif
28 typedef unsigned char * __block;
29 
30 long csavecompressed(char *finam, __block tobesaved, color pala[256], long exto);
31 
32 void cpackbitl(unsigned char *line, int size, Common::Stream *out);
33 void cpackbitl16(unsigned short *line, int size, Common::Stream *out);
34 void cpackbitl32(unsigned int *line, int size, Common::Stream *out);
35 int  cunpackbitl(unsigned char *line, int size, Common::Stream *in);
36 int  cunpackbitl16(unsigned short *line, int size, Common::Stream *in);
37 int  cunpackbitl32(unsigned int *line, int size, Common::Stream *in);
38 
39 //=============================================================================
40 
41 long save_lzw(char *fnn, Common::Bitmap *bmpp, color *pall, long offe);
42 
43 /*long load_lzw(char*fnn,Common::Bitmap*bmm,color*pall,long ooff);*/
44 long load_lzw(Common::Stream *in, Common::Bitmap *bmm, color *pall);
45 long savecompressed_allegro(char *fnn, Common::Bitmap *bmpp, color *pall, long write_at);
46 long loadcompressed_allegro(Common::Stream *in, Common::Bitmap **bimpp, color *pall, long read_at);
47 
48 //extern char *lztempfnm;
49 extern Common::Bitmap *recalced;
50 
51 #endif // __AC_COMPRESS_H
52