viewport.c
changeset 2187 2a51f8925eeb
parent 2186 461a2aff3486
child 2319 9902d3ffa309
--- a/viewport.c	Sun Jul 24 14:12:37 2005 +0000
+++ b/viewport.c	Sun Jul 24 15:56:31 2005 +0000
@@ -361,7 +361,7 @@
 	ViewportDrawer *vd = _cur_vd;
 	TileSpriteToDraw *ts;
 
-	assert((image & 0x3FFF) < NUM_SPRITES);
+	assert((image & SPRITE_MASK) < MAX_SPRITES);
 
 	if (vd->spritelist_mem >= vd->eof_spritelist_mem) {
 		DEBUG(misc, 0) ("Out of sprite mem");
@@ -403,7 +403,7 @@
 {
 	const ViewportDrawer *vd = _cur_vd;
 	Point pt = RemapCoords(x, y, z);
-	const SpriteDimension *sd = GetSpriteDimension(image & 0x3FFF);
+	const SpriteDimension *sd = GetSpriteDimension(image & SPRITE_MASK);
 
 	if (pt.x + sd->xoffs >= vd->dpi.left + vd->dpi.width ||
 			pt.x + sd->xoffs + sd->xsize <= vd->dpi.left ||
@@ -422,7 +422,7 @@
 	const SpriteDimension *sd;
 	Point pt;
 
-	assert((image & 0x3FFF) < NUM_SPRITES);
+	assert((image & SPRITE_MASK) < MAX_SPRITES);
 
 	if (vd->combine_sprites == 2) {
 		AddCombinedSprite(image, x, y, z);
@@ -462,7 +462,7 @@
 
 	pt = RemapCoords(x, y, z);
 
-	sd = GetSpriteDimension(image & 0x3FFF);
+	sd = GetSpriteDimension(image & SPRITE_MASK);
 	if ((ps->left = (pt.x += sd->xoffs)) >= vd->dpi.left + vd->dpi.width ||
 			(ps->right = (pt.x + sd->xsize)) <= vd->dpi.left ||
 			(ps->top = (pt.y += sd->yoffs)) >= vd->dpi.top + vd->dpi.height ||
@@ -494,7 +494,7 @@
 	ViewportDrawer *vd = _cur_vd;
 	ChildScreenSpriteToDraw *cs;
 
-	assert((image & 0x3FFF) < NUM_SPRITES);
+	assert((image & SPRITE_MASK) < MAX_SPRITES);
 
 	if (vd->spritelist_mem >= vd->eof_spritelist_mem) {
 		DEBUG(misc, 0) ("Out of sprite mem");