diff options
author | Juan J. MartÃnez <jjm@usebox.net> | 2022-01-07 19:07:59 +0000 |
---|---|---|
committer | Juan J. MartÃnez <jjm@usebox.net> | 2022-01-07 19:07:59 +0000 |
commit | 0b007b77028aa3ef2056ff915b0a197576b3c4f9 (patch) | |
tree | d9e29728697bc3ccf34d322a29a7e9b47e6ea2b0 /src/spman/spman.c | |
parent | c149e9f96d9f6901656a2dfe4482bb8b45f1f62b (diff) | |
parent | ce3c89948e6fc3c7234e8f47e048d74f917e6bf9 (diff) | |
download | ubox-msx-lib-0b007b77028aa3ef2056ff915b0a197576b3c4f9.tar.gz ubox-msx-lib-0b007b77028aa3ef2056ff915b0a197576b3c4f9.zip |
Merge branch 'master' into 'master'
Replacing VRAM magic numbers with constants
See merge request reidrac/ubox-msx-lib!23
Diffstat (limited to 'src/spman/spman.c')
-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); } |