aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-12-29 19:01:29 +0000
committerJuan J. Martinez <jjm@usebox.net>2021-12-29 19:01:29 +0000
commit59841503c6ff29aebb9577492ec2d7908bc67a35 (patch)
treed590ba3ce36c7fe30977a03f981b3020a94942ff
parent0b8212ca23cfcb881159a2f81327a15ea6cfdcba (diff)
downloadubox-msx-lib-59841503c6ff29aebb9577492ec2d7908bc67a35.tar.gz
ubox-msx-lib-59841503c6ff29aebb9577492ec2d7908bc67a35.zip
Initialze the sprite index to 0
Fixes issue #10; thanks to @torihino for the report.
-rw-r--r--src/spman/spman.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/spman/spman.c b/src/spman/spman.c
index 0c7d7d1..642864e 100644
--- a/src/spman/spman.c
+++ b/src/spman/spman.c
@@ -17,6 +17,7 @@ uint8_t sp_last_pat;
void spman_init()
{
sp_last_pat = 0;
+ sp_idx = 0;
memset(sp_pat_map, SPMAN_PAT_UNUSED, SPMAN_MAX_PATTERNS);
spman_sprite_flush();
}