git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/include/gbdk/rledecompress.h

      1 /** @file gbdk/rledecompress.h
      2 
      3     Decompressor for RLE encoded data
      4 
      5     Decompresses data which has been compressed with
      6     @ref utility_gbcompress "gbcompress" using the `--alg=rle` argument.
      7 */
      8 
      9 #ifndef __RLEDECOMPRESS_H_INCLUDE
     10 #define __RLEDECOMPRESS_H_INCLUDE
     11 
     12 #include <types.h>
     13 #include <stdint.h>
     14 
     15 #define RLE_STOP 0
     16 
     17 #if defined(__TARGET_gb) || defined(__TARGET_ap) || defined(__TARGET_duck) || defined(__TARGET_nes)
     18 /** Initialize the RLE decompressor with RLE data at address __data__
     19 
     20     @param data   Pointer to start of RLE compressed data
     21 
     22     @see rle_decompress
     23  */
     24 uint8_t rle_init(void * data);
     25 
     26 /** Decompress RLE compressed data into __dest__ for length __len__ bytes
     27 
     28     @param dest   Pointer to destination buffer/address
     29     @param len    Number of bytes to decompress
     30     @return       Returns `0` if compression is complete, `1` if there is more data to decompress
     31 
     32     Before calling this function @ref rle_init must be called
     33     one time to initialize the RLE decompressor.
     34 
     35     Decompresses data which has been compressed with
     36     @ref utility_gbcompress "gbcompress" using the `--alg=rle` argument.
     37 
     38     @see rle_init
     39  */
     40 uint8_t rle_decompress(void * dest, uint8_t len);
     41 #elif defined(__TARGET_sms) || defined(__TARGET_gg) || defined(__TARGET_msx)
     42 uint8_t rle_init(void * data) Z88DK_FASTCALL;
     43 uint8_t rle_decompress(void * dest, uint8_t len) Z88DK_CALLEE;
     44 #else
     45   #error Unrecognized port
     46 #endif
     47 
     48 #endif

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.