macros.h
changeset 900 27eb21ced433
parent 703 3f64a428fcbc
child 926 a6d140a6a4de
equal deleted inserted replaced
899:69db9cb6bc9d 900:27eb21ced433
   146 	}
   146 	}
   147 	return i + FIND_FIRST_BIT(value & 0x3F);
   147 	return i + FIND_FIRST_BIT(value & 0x3F);
   148 }
   148 }
   149 
   149 
   150 
   150 
   151 #if TILE_X_BITS + TILE_Y_BITS <= 16
   151 typedef uint16 TileIndex;
   152 	typedef uint16 TileIndex;
       
   153 	typedef int16 TileIndexDiff;
       
   154 #else
       
   155 	typedef uint32 TileIndex;
       
   156 	typedef int32 TileIndexDiff;
       
   157 #endif
       
   158 
   152 
   159 /* [min,max), strictly less than */
   153 /* [min,max), strictly less than */
   160 #define IS_BYTE_INSIDE(a,min,max) ((byte)((a)-(min)) < (byte)((max)-(min)))
   154 #define IS_BYTE_INSIDE(a,min,max) ((byte)((a)-(min)) < (byte)((max)-(min)))
   161 #define IS_INT_INSIDE(a,min,max) ((uint)((a)-(min)) < (uint)((max)-(min)))
   155 #define IS_INT_INSIDE(a,min,max) ((uint)((a)-(min)) < (uint)((max)-(min)))
   162 
   156