iOS/libraries/allegro/allegro/src/modesel.c
/* bpp_index_for_mode:
 *  Returns the bpp index of the color depth given by DEPTH for
 *  the specified MODE of the specified DRIVER or -1 if DEPTH
 *  is not supported.
 */
Returns the bpp index of the color depth given by DEPTH for
the specified MODE of the specified DRIVER or -1 if DEPTH
is not supported.
Returns the bpp index of the color depth given by DEPTH for the specified MODE of the specified DRIVER or - 1 if DEPTH is not supported .
static int bpp_index_for_mode(int depth, int driver, int mode)
{
   int i, index = -1;
   for (i=0; i < N_COLOR_DEPTH; i++) {
      if (driver_list[driver].mode_list[mode].has_bpp[i]) {
         index++;
         if (bpp_value_list[i] == depth)
            return index;
      }
   }
   return -1;
}
static int bpp_index_for_mode ( int depth , int driver , int mode ) { int i , index = -1 ; for ( i = 0 ; i < N_COLOR_DEPTH ; i ++ ) { if ( driver_list [ driver ] . mode_list [ mode ] . has_bpp [ i ] ) { index ++ ; if ( bpp_value_list [ i ] == depth ) return index ; } } return -1 ; }
bpp_index_for_mode:
  Returns the bpp index of the color depth given by DEPTH for
  the specified MODE of the specified DRIVER or -1 if DEPTH
  is not supported.
bpp_index_for_mode : Returns the bpp index of the color depth given by DEPTH for the specified MODE of the specified DRIVER or - 1 if DEPTH is not supported .