diff options
author | Pedro de Medeiros <pedro.medeiros@gmail.com> | 2022-01-07 15:53:15 -0300 |
---|---|---|
committer | Pedro de Medeiros <pedro.medeiros@gmail.com> | 2022-01-07 15:59:19 -0300 |
commit | ce3c89948e6fc3c7234e8f47e048d74f917e6bf9 (patch) | |
tree | d9e29728697bc3ccf34d322a29a7e9b47e6ea2b0 /src/spman | |
parent | c149e9f96d9f6901656a2dfe4482bb8b45f1f62b (diff) | |
download | ubox-msx-lib-ce3c89948e6fc3c7234e8f47e048d74f917e6bf9.tar.gz ubox-msx-lib-ce3c89948e6fc3c7234e8f47e048d74f917e6bf9.zip |
Replacing VRAM magic numbers with constants
Diffstat (limited to 'src/spman')
-rw-r--r-- | src/spman/spman.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/spman/spman.c b/src/spman/spman.c index 642864e..ba8a939 100644 --- a/src/spman/spman.c +++ b/src/spman/spman.c @@ -6,6 +6,7 @@ #define SPMAN_PAT_UNUSED 0xff #define SPMAN_MAX_SPRITES 32 #define SPMAN_MAX_PATTERNS 64 +#define SPMAN_SPR_ATTRS 0x1b00 uint8_t sp_last_sprite, sp_last_fixed_sprite, sp_idx; struct sprite_attr sp_fixed[SPMAN_MAX_SPRITES]; @@ -84,7 +85,7 @@ static uint8_t *p; void spman_update() { - p = (uint8_t*) 0x1b00; + p = (uint8_t*)SPMAN_SPR_ATTRS; if (sp_last_sprite) { @@ -115,5 +116,5 @@ void spman_update() void spman_hide_all_sprites() { ubox_wait_vsync(); - ubox_write_vm((uint8_t *)0x1b00, 4, (uint8_t *)hide); + ubox_write_vm((uint8_t *)SPMAN_SPR_ATTRS, 4, (uint8_t *)hide); } |