Ejemplo n.º 1
0
// Conversion RGB (0..63) to Hi-color
unsigned short xh_RgbHiPal(unsigned char R, unsigned char G, unsigned char B)
{
   if(xg_hi16 == 1)
    return(RGBHI16(R,G,B));
   else
    return(RGBHI15(R,G,B));
}
Ejemplo n.º 2
0
// Pro transparentni animaci: z indexu hodnotu transparentni barvy
int IndexToTranspCol(int TranspInx, char *palx)
{   unsigned int TrCol;
    int      palindex, *Mapio;

#ifdef HICOLOR
    if(xg_256 == MM_Hic)
    { palindex=TranspInx*3;
      if(xg_hi16)
       TrCol=RGBHI16(palx[palindex],palx[palindex+1],palx[palindex+2]);
      else
       TrCol=RGBHI15(palx[palindex],palx[palindex+1],palx[palindex+2]);
    }
    else
#endif
    { Mapio = (int*)palx;
      TrCol = Mapio[TranspInx];
    }

    return( TrCol );
}