cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

gbdecompress.h (1980B)


      1/** @file gb/gbdecompress.h
      2
      3    GB-Compress decompressor
      4    Compatible with the compression used in GBTD
      5    @see utility_gbcompress "gbcompress"
      6*/
      7
      8#ifndef __GBDECOMPRESS_H_INCLUDE
      9#define __GBDECOMPRESS_H_INCLUDE
     10
     11#include <types.h>
     12#include <stdint.h>
     13
     14/** gb-decompress data from sour into dest
     15
     16    @param sour   Pointer to source gb-compressed data
     17    @param dest   Pointer to destination buffer/address
     18
     19    @see gb_decompress_bkg_data, gb_decompress_win_data, gb_decompress_sprite_data
     20 */
     21uint16_t gb_decompress(const uint8_t * sour, uint8_t * dest) OLDCALL PRESERVES_REGS(b, c);
     22
     23
     24/** gb-decompress background tiles into VRAM
     25
     26    @param first_tile  Index of the first tile to write
     27    @param sour        Pointer to (gb-compressed 2 bpp) source Tile Pattern data.
     28
     29    Note: This function avoids writes during modes 2 & 3
     30
     31    @see gb_decompress_bkg_data, gb_decompress_win_data, gb_decompress_sprite_data
     32*/
     33void gb_decompress_bkg_data(uint8_t first_tile, const uint8_t * sour) OLDCALL PRESERVES_REGS(b, c);
     34
     35
     36/** gb-decompress window tiles into VRAM
     37
     38    @param first_tile  Index of the first tile to write
     39    @param sour        Pointer to (gb-compressed 2 bpp) source Tile Pattern data.
     40
     41    This is the same as @ref gb_decompress_bkg_data, since the Window Layer and
     42    Background Layer share the same Tile pattern data.
     43
     44    Note: This function avoids writes during modes 2 & 3
     45
     46    @see gb_decompress, gb_decompress_bkg_data, gb_decompress_sprite_data
     47 */
     48void gb_decompress_win_data(uint8_t first_tile, const uint8_t * sour) OLDCALL PRESERVES_REGS(b, c);
     49
     50
     51/** gb-decompress sprite tiles into VRAM
     52
     53    @param first_tile  Index of the first tile to write
     54    @param sour        Pointer to source compressed data
     55
     56    Note: This function avoids writes during modes 2 & 3
     57
     58    @see gb_decompress, gb_decompress_bkg_data, gb_decompress_win_data
     59 */
     60void gb_decompress_sprite_data(uint8_t first_tile, const uint8_t * sour) OLDCALL PRESERVES_REGS(b, c);
     61
     62#endif