gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit df36d615cf34fb2c225beef8e95b6e5859ad9534 parent 0396889861b38456558a67deca5faab0cfc153e0 Author: Toxa <untoxa@mail.ru> Date: Fri, 17 Sep 2021 10:20:36 +0300 rename 1bit functions into 1bpp Diffstat:
| M | gbdk-lib/include/gb/gb.h | 12 | +++++------- |
| M | gbdk-lib/include/sms/sms.h | 2 | -- |
| M | gbdk-lib/libc/targets/gbz80/set_1bit_data.s | 10 | +++++----- |
3 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -829,8 +829,7 @@ void set_bkg_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) OLD @see SHOW_BKG, HIDE_BKG, set_bkg_tiles */ -void set_bkg_1bit_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data, uint8_t color) OLDCALL __preserves_regs(b, c); -#define set_bkg_1bpp_data set_bkg_1bit_data +void set_bkg_1bpp_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data, uint8_t color) OLDCALL __preserves_regs(b, c); /** Copies from Background / Window VRAM Tile Pattern data into a buffer @@ -1036,12 +1035,12 @@ void set_win_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) OLD @param nb_tiles Number of tiles to write @param data Pointer to (1bpp) source Tile Pattern data - This is the same as @ref set_bkg_1bit_data, since the Window Layer and + This is the same as @ref set_bkg_1bpp_data, since the Window Layer and Background Layer share the same Tile pattern data. - @see set_bkg_data, set_bkg_1bit_data, set_win_data + @see set_bkg_data, set_bkg_1bpp_data, set_win_data */ -void set_win_1bit_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) OLDCALL __preserves_regs(b, c); +void set_win_1bpp_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) OLDCALL __preserves_regs(b, c); /** Copies from Window / Background VRAM Tile Pattern data into a buffer @@ -1228,8 +1227,7 @@ void set_sprite_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) @see SHOW_SPRITES, HIDE_SPRITES, set_sprite_tile */ -void set_sprite_1bit_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) OLDCALL __preserves_regs(b, c); -#define set_sprite_1bpp_data set_sprite_1bit_data +void set_sprite_1bpp_data(uint8_t first_tile, uint8_t nb_tiles, const uint8_t *data) OLDCALL __preserves_regs(b, c); /** Copies from Sprite VRAM Tile Pattern data into a buffer diff --git a/gbdk-lib/include/sms/sms.h b/gbdk-lib/include/sms/sms.h @@ -547,11 +547,9 @@ void set_tile_1bpp_data(uint16_t start, uint16_t ntiles, const void *src, uint16 inline void set_bkg_1bpp_data(uint16_t start, uint16_t ntiles, const void *src) { set_tile_1bpp_data(start, ntiles, src, _current_1bpp_colors); } -#define set_bkg_1bit_data set_bkg_1bpp_data inline void set_sprite_1bpp_data(uint16_t start, uint16_t ntiles, const void *src) { set_tile_1bpp_data((uint8_t)(start) + 0x100u, ntiles, src, _current_1bpp_colors); } -#define set_sprite_1bit_data set_sprite_1bpp_data /** Copies arbitrary data to an address in VRAM diff --git a/gbdk-lib/libc/targets/gbz80/set_1bit_data.s b/gbdk-lib/libc/targets/gbz80/set_1bit_data.s @@ -2,15 +2,15 @@ .area _HOME -_set_bkg_1bit_data:: -_set_win_1bit_data:: +_set_bkg_1bpp_data:: +_set_win_1bpp_data:: ld d, #0x90 ldh a, (.LCDC) and #LCDCF_BG8000 - jr z, .copy_1bit_tiles -_set_sprite_1bit_data:: + jr z, .copy_1bpp_tiles +_set_sprite_1bpp_data:: ld d, #0x80 -.copy_1bit_tiles: +.copy_1bpp_tiles: push bc lda hl, 8(sp)
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.