git.y1.nz

gbdk-2020

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

commit e24acac78bfba48982e6651833ab0665c9502b1d
parent 9e2fa7e9451a733dcd310cdbae4fbe073e922a5b
Author: Toxa <56631470+untoxa@users.noreply.github.com>
Date:   Sat, 20 Mar 2021 00:08:55 +0300

Merge pull request #151 from bbbbbr/docs_updates

Docs updates - initial release notes (docs version) and gbcompress header comments
Diffstat:
Mdocs/pages/release_notes.md23+++++++++++++++++++++++
Mgbdk-lib/include/gb/gbdecompress.h41++++++++++++++++++++++++++++++++++++++---
Mgbdk-lib/include/gb/metasprites.h7++++++-
3 files changed, 67 insertions(+), 4 deletions(-)

diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md @@ -6,6 +6,29 @@ https://github.com/Zal0/gbdk-2020/releases # GBDK 2020 Release Notes +## GBDK 2020 4.0.3 + 2021/03 + - Library + - Added @ref set_vram_byte() + - Added @ref set_bkg_tile_xy() / @ref set_win_tile_xy() + - Added @ref get_bkg_xy_addr() / @ref get_win_xy_addr() + - Added @ref get_bkg_submap() / @ref get_win_submap() + - Added metasprite api support + - Added gb_decompress support + - Added @ref calloc / @ref malloc / @ref realloc / @ref free and generic @ref memmove + - Improved @ref printf(): ignore %0 padding and %1-9 width specifier instead of not printing, support upper case %X + - Fixed @ref line(): handle drawing when x1 is less than x2 + - Examples + - Added large_map: showing how to use @ref set_bkg_submap() + - Added scroller: showing use of @ref get_bkg_xy_addr(), @ref set_bkg_tile_xy() and @ref set_vram_byte + - Added gbdecompress: de-compressing tile data into vram + - Added template projects + - Fixed build issue with banks_autobank example + - Improved sgb_border + - Added GBCompress utility + - Added png2metaspr utility and metasprites example + + ## GBDK 2020 4.0.2 2021/01/17 - Includes SDCC snapshot build version 12016 (has a fix for duplicate debug symbols generated from inlined header functions which GBDK 4.0+ uses) diff --git a/gbdk-lib/include/gb/gbdecompress.h b/gbdk-lib/include/gb/gbdecompress.h @@ -1,22 +1,57 @@ -// GB-Compress decompressor -// Compatible with GBTD +/** @file gb/gbcompress.h + + GB-Compress decompressor + Compatible with the compression used in GBTD +*/ #ifndef __GBDECOMPRESS_H_INCLUDE #define __GBDECOMPRESS_H_INCLUDE /** gb-decompress data from sour into dest + + @param sour Pointer to source gb-compressed data + @param dest Pointer to destination buffer/address + + @see gb_decompress_bkg_data, gb_decompress_win_data, gb_decompress_sprite_data */ void gb_decompress(const unsigned char * sour, unsigned char * dest) __preserves_regs(b, c); + /** gb-decompress background tiles into VRAM - */ + + @param first_tile Index of the first tile to write + @param sour Pointer to (gb-compressed 2 bpp) source Tile Pattern data. + + Note: This function avoids writes during modes 2 & 3 + + @see gb_decompress_bkg, gb_decompress_win_data, gb_decompress_sprite_data +*/ void gb_decompress_bkg_data(UINT8 first_tile, const unsigned char * sour) __preserves_regs(b, c); + /** gb-decompress window tiles into VRAM + + @param first_tile Index of the first tile to write + @param sour Pointer to (gb-compressed 2 bpp) source Tile Pattern data. + + This is the same as @ref gb_decompress_bkg_data, since the Window Layer and + Background Layer share the same Tile pattern data. + + Note: This function avoids writes during modes 2 & 3 + + @see gb_decompress, gb_decompress_bkg_data, gb_decompress_sprite_data */ void gb_decompress_win_data(UINT8 first_tile, const unsigned char * sour) __preserves_regs(b, c); + /** gb-decompress sprite tiles into VRAM + + @param first_tile Index of the first tile to write + @param sour Pointer to source compressed data + + Note: This function avoids writes during modes 2 & 3 + + @see gb_decompress, gb_decompress_bkg_data, gb_decompress_win_data */ void gb_decompress_sprite_data(UINT8 first_tile, const unsigned char * sour) __preserves_regs(b, c); diff --git a/gbdk-lib/include/gb/metasprites.h b/gbdk-lib/include/gb/metasprites.h @@ -1,3 +1,8 @@ +/** @file gb/metasprites.h + + Metasprite support +*/ + #ifndef _METASPRITES_H_INCLUDE #define _METASPRITES_H_INCLUDE @@ -23,7 +28,7 @@ static UBYTE __move_metasprite_hvflip(UINT8 id, UINT8 x, UINT8 y); static void __hide_metasprite(UINT8 id); /** - * Moves metasprite to the absolute position x and y, allocating hardware sprites from base_sprite using tiles from bast_tile + * Moves metasprite to the absolute position x and y, allocating hardware sprites from base_sprite using tiles from base_tile * @param metasprite metasprite description * @param base_tile start tile where tiles for that metasprite begin * @param base_sprite start hardware sprite

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