summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Shaw <jshaw@netsurf-browser.org>2007-11-27 17:08:40 (GMT)
committer James Shaw <jshaw@netsurf-browser.org>2007-11-27 17:08:40 (GMT)
commit9ee5564711c3974286faf89a6ca2992cb2f60fa4 (patch)
tree0654e4f15c0f6adb4a5a6c17484a726d0b074881
parent689d6a6f937c8ab92e1943b5d4ee4e77f2616f29 (diff)
downloadlibrosprite-9ee5564711c3974286faf89a6ca2992cb2f60fa4.tar.gz
librosprite-9ee5564711c3974286faf89a6ca2992cb2f60fa4.tar.bz2
Bugfix mask_state initialization
svn path=/import/jshaw/libsprite/; revision=9997
-rw-r--r--trunk/libsprite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trunk/libsprite.c b/trunk/libsprite.c
index 8722103..c3806ac 100644
--- a/trunk/libsprite.c
+++ b/trunk/libsprite.c
@@ -360,7 +360,7 @@ struct sprite_mask_state* sprite_init_mask_state(struct sprite* sprite, struct s
mask_state->x = header->first_used_bit;
mask_state->y = 0;
mask_state->first_used_bit = header->first_used_bit;
- mask_state->row_max_bit = header->width_words * 32 - (31 - header->last_used_bit);
+ mask_state->row_max_bit = sprite->width * sprite->mode->maskbpp;
mask_state->height = sprite->height;
mask_state->bpp = sprite->mode->maskbpp;
mask_state->current_word = BTUINT(mask);