gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit af0e508a3b2fb9ea30fa118bcafc4e371db508dc parent 9f55694b6da6c5abcde5150a4454d020aa72a78c Author: Toxa <untoxa@mail.ru> Date: Thu, 9 Sep 2021 14:02:14 +0300 SMS/GG get/set_sprite_prod() which does nothing, but needed for game portability Diffstat:
| M | gbdk-lib/include/gb/gb.h | 4 | ++-- |
| M | gbdk-lib/include/sms/sms.h | 14 | ++++++++++++++ |
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -1364,7 +1364,7 @@ inline uint8_t get_sprite_tile(uint8_t nb) { \li Bit 0 - GBC only. Bits 0-2 indicate which of the 7 OBJ colour palettes the sprite is assigned. */ -inline void set_sprite_prop(uint8_t nb, uint8_t prop){ +inline void set_sprite_prop(uint8_t nb, uint8_t prop) { shadow_OAM[nb].prop=prop; } @@ -1374,7 +1374,7 @@ inline void set_sprite_prop(uint8_t nb, uint8_t prop){ @param nb Sprite number, range 0 - 39 @see set_sprite_prop for property bitfield settings */ -inline uint8_t get_sprite_prop(uint8_t nb){ +inline uint8_t get_sprite_prop(uint8_t nb) { return shadow_OAM[nb].prop; } diff --git a/gbdk-lib/include/sms/sms.h b/gbdk-lib/include/sms/sms.h @@ -66,6 +66,11 @@ */ #define M_NO_INTERP 0x08U +#define S_PALETTE 0x10U +#define S_FLIPX 0x20U +#define S_FLIPY 0x40U +#define S_PRIORITY 0x80U + // VDP helper macros #define __WRITE_VDP_REG(REG, v) shadow_##REG=(v);__critical{VDP_CMD=(shadow_##REG),VDP_CMD=REG;} #define __READ_VDP_REG(REG) shadow_##REG @@ -634,6 +639,15 @@ inline uint8_t get_sprite_tile(uint8_t nb) { return shadow_OAM[0x41+(nb << 1)]; } +inline void set_sprite_prop(uint8_t nb, uint8_t prop) { + nb; prop; +} + +inline uint8_t get_sprite_prop(uint8_t nb) { + nb; + return 0; +} + /** Moves sprite number __nb__ to the __x__, __y__ position on the screen. @param nb Sprite number, range 0 - 39
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.