Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

blit_transparent_rle.h

Go to the documentation of this file.
00001 /*
00002         ------------------------------------------------------------------------
00003         ClanLib, the platform independent game SDK.
00004 
00005         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00006         version 2. See COPYING for details.
00007 
00008         For a total list of contributers see CREDITS.
00009 
00010         ------------------------------------------------------------------------
00011 */
00012 
00013 #ifndef header_blit_transparent_rle
00014 #define header_blit_transparent_rle
00015 
00016 #include "blitters.h"
00017 
00018 class CL_SurfaceProvider;
00019 
00020 class CL_Blit_Transparent_RLE :
00021         public CL_Blit_NoClip
00022 {
00023 protected:
00024         int width, height, no_sprs;
00025         int bytes_per_pixel;
00026         unsigned char **rle_lines;
00027         
00028         enum
00029         {
00030                 cmd_skip,     // next word = bytes to skip
00031                 cmd_copy,     // next word = bytes to copy
00032                 cmd_alpha,    // next word = _blocks_ to apply alpha
00033                 cmd_end
00034         };
00035         
00036         int calc_rle_size(unsigned char *alpha_line);
00037 
00038         virtual unsigned char *make_rle_line(
00039                 unsigned char *src_line, 
00040                 unsigned char *alpha_line) = 0;
00041 
00042         virtual void blt_line(
00043                 unsigned char *s, 
00044                 unsigned char *d) = 0;
00045 
00046 public:
00047 
00048         CL_Blit_Transparent_RLE(
00049                 CL_SurfaceProvider *provider,
00050                 int bytes_per_pixel);
00051 
00052         virtual ~CL_Blit_Transparent_RLE();
00053 
00054         virtual void blt_noclip(
00055                 CL_Target *dest_surf,
00056                 int x,
00057                 int y,
00058                 int spr_no);
00059 };
00060 
00061 #endif

Generated at Wed Apr 4 19:53:59 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001