aboutsummaryrefslogtreecommitdiff
path: root/src/spman
diff options
context:
space:
mode:
authorJuan J. Martínez <jjm@usebox.net>2022-01-07 19:07:59 +0000
committerJuan J. Martínez <jjm@usebox.net>2022-01-07 19:07:59 +0000
commit0b007b77028aa3ef2056ff915b0a197576b3c4f9 (patch)
treed9e29728697bc3ccf34d322a29a7e9b47e6ea2b0 /src/spman
parentc149e9f96d9f6901656a2dfe4482bb8b45f1f62b (diff)
parentce3c89948e6fc3c7234e8f47e048d74f917e6bf9 (diff)
downloadubox-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')
-rw-r--r--src/spman/spman.c5
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);
}