]> icculus.org git repositories - btb/d2x.git/blob - include/rle.h
Use PhysicsFS for making the hoard ham.
[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  *
15  * Protypes for rle functions.
16  *
17  */
18
19 #ifndef _RLE_H
20 #define _RLE_H
21
22 #include "pstypes.h"
23 #include "gr.h"
24
25 #if 0
26 void gr_rle_decode( ubyte * src, ubyte * dest, int dest_len );
27 #else
28 void gr_rle_decode( ubyte * src, ubyte * dest );
29 #endif
30 int gr_rle_encode( int org_size, ubyte *src, ubyte *dest );
31 int gr_rle_getsize( int org_size, ubyte *src );
32 ubyte * gr_rle_find_xth_pixel( ubyte *src, int x,int * count, ubyte color );
33 int gr_bitmap_rle_compress( grs_bitmap * bmp );
34 void gr_rle_expand_scanline_masked( ubyte *dest, ubyte *src, int x1, int x2  );
35 void gr_rle_expand_scanline( ubyte *dest, ubyte *src, int x1, int x2  );
36
37 grs_bitmap * rle_expand_texture( grs_bitmap * bmp );
38
39 void rle_cache_flush();
40
41 void rle_swap_0_255(grs_bitmap *bmp);
42
43 void rle_remap(grs_bitmap *bmp, ubyte *colormap);
44
45 #endif