]> icculus.org git repositories - btb/d2x.git/blob - include/rle.h
set transparency and swap 0/255 correctly for mac data files
[btb/d2x.git] / include / rle.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13 /*
14  * $Source: /cvs/cvsroot/d2x/include/rle.h,v $
15  * $Revision: 1.2 $
16  * $Author: btb $
17  * $Date: 2002-08-15 05:42:33 $
18  * 
19  * Protypes for rle functions.
20  * 
21  * $Log: not supported by cvs2svn $
22  * Revision 1.1.1.1  2001/01/19 03:30:16  bradleyb
23  * Import of d2x-0.0.8
24  *
25  * Revision 1.1.1.1  1999/06/14 22:02:19  donut
26  * Import of d1x 1.37 source.
27  *
28  * Revision 1.5  1995/01/14  11:32:20  john
29  * Added rle_cache_flush function.
30  * 
31  * Revision 1.4  1994/11/10  13:16:01  matt
32  * Added includes
33  * 
34  * Revision 1.3  1994/11/09  19:53:51  john
35  * Added texture rle caching.
36  * 
37  * Revision 1.2  1994/11/09  16:35:18  john
38  * First version with working RLE bitmaps.
39  * 
40  * Revision 1.1  1994/11/09  12:40:17  john
41  * Initial revision
42  * 
43  * 
44  */
45
46
47
48 #ifndef _RLE_H
49 #define _RLE_H
50
51 #include "pstypes.h"
52 #include "gr.h"
53
54 void gr_rle_decode( ubyte * src, ubyte * dest );
55 int gr_rle_encode( int org_size, ubyte *src, ubyte *dest );
56 int gr_rle_getsize( int org_size, ubyte *src );
57 ubyte * gr_rle_find_xth_pixel( ubyte *src, int x,int * count, ubyte color );
58 int gr_bitmap_rle_compress( grs_bitmap * bmp );
59 void gr_rle_expand_scanline_masked( ubyte *dest, ubyte *src, int x1, int x2  );
60 void gr_rle_expand_scanline( ubyte *dest, ubyte *src, int x1, int x2  );
61
62 grs_bitmap * rle_expand_texture( grs_bitmap * bmp );
63
64 void rle_cache_flush();
65
66 void rle_swap_0_255(grs_bitmap *bmp);
67
68 #endif
69