static int numHiresTiles(int element)
{
- if (!IS_MM_WALL(element))
- return 1;
-
- int bits = MM_WALL_BITS(element);
- int num_bits = 0;
-
- while (bits)
- {
- bits &= bits - 1;
- num_bits++;
- }
+ if (IS_MM_WALL(element))
+ return get_number_of_bits(MM_WALL_BITS(element));
- return num_bits;
+ return 1;
}
static void SetDrawModeHiRes(int element)