(svn r7752) -Codechange: An off-by-one problem reduced the sprite limit by 1 whole sprite
authorpeter1138
Tue, 02 Jan 2007 18:19:56 +0000
changeset 5721 25220a9b7c27
parent 5720 cc0ceeafaa55
child 5722 386d2ba7b160
(svn r7752) -Codechange: An off-by-one problem reduced the sprite limit by 1 whole sprite
table/sprites.h
--- a/table/sprites.h	Tue Jan 02 17:34:03 2007 +0000
+++ b/table/sprites.h	Tue Jan 02 18:19:56 2007 +0000
@@ -1314,9 +1314,9 @@
  * @see SpriteSetup */
 enum SpriteMasks {
 	///Maximum number of sprites that can be loaded at a given time.
-	MAX_SPRITES = (1 << SPRITE_WIDTH) - 1,
+	MAX_SPRITES = 1 << SPRITE_WIDTH,
 	///The mask to for the main sprite
-	SPRITE_MASK = MAX_SPRITES,
+	SPRITE_MASK = MAX_SPRITES - 1,
 	///The mask for the auxiliary sprite (the one that takes care of recoloring)
 	PALETTE_SPRITE_MASK = ((1 << PALETTE_SPRITE_WIDTH) - 1) << PALETTE_SPRITE_START,
 	///Mask for the auxiliary sprites if it is locate in the LSBs