mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Remove obsolete function
This commit is contained in:
parent
17c0a1fa47
commit
641ffc4b97
76
pixmap.cpp
76
pixmap.cpp
@ -292,82 +292,6 @@ HRESULT CPixmap::BltFast(SDL_Texture *lpSDL,
|
||||
return ddrval;
|
||||
}
|
||||
|
||||
// Cherche une couleur dans la palette principale.
|
||||
// En mode plein écran, il faut chercher dans la palette
|
||||
// correspondant aux images (obtenue avec SavePalette),
|
||||
// alors qu'en mode fenêtre, il faut chercher dans la
|
||||
// palette système (obtenue avec InitSysPalette) !!!
|
||||
|
||||
int CPixmap::SearchColor(int red, int green, int blue)
|
||||
{
|
||||
int i, j, delta, min;
|
||||
|
||||
if ( m_bFullScreen )
|
||||
{
|
||||
for ( i=0 ; i<256 ; i++ )
|
||||
{
|
||||
if ( red == m_pal[i].peRed &&
|
||||
green == m_pal[i].peGreen &&
|
||||
blue == m_pal[i].peBlue ) return i;
|
||||
}
|
||||
|
||||
// Cherche la couleur la plus proche.
|
||||
min = 10000;
|
||||
j = -1;
|
||||
for ( i=0 ; i<256 ; i++ )
|
||||
{
|
||||
delta = abs(red - m_pal[i].peRed )+
|
||||
abs(green - m_pal[i].peGreen)+
|
||||
abs(blue - m_pal[i].peBlue );
|
||||
|
||||
if ( delta < min )
|
||||
{
|
||||
min = delta;
|
||||
j = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_bPalette )
|
||||
{
|
||||
for ( i=0 ; i<256 ; i++ )
|
||||
{
|
||||
if ( red == m_sysPal[i].peRed &&
|
||||
green == m_sysPal[i].peGreen &&
|
||||
blue == m_sysPal[i].peBlue ) return i;
|
||||
}
|
||||
|
||||
// Cherche la couleur la plus proche.
|
||||
min = 10000;
|
||||
j = -1;
|
||||
for ( i=0 ; i<256 ; i++ )
|
||||
{
|
||||
delta = abs(red - m_sysPal[i].peRed )+
|
||||
abs(green - m_sysPal[i].peGreen)+
|
||||
abs(blue - m_sysPal[i].peBlue );
|
||||
|
||||
if ( delta < min )
|
||||
{
|
||||
min = delta;
|
||||
j = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
j = (blue >>3) &0x001F;
|
||||
j |= ((green>>2)<< 5)&0x07E0;
|
||||
j |= ((red >>3)<<11)&0xF800; // mode 5-6-5
|
||||
//? j = (blue >>3) &0x001F;
|
||||
//? j |= ((green>>3)<< 5)&0x03E0;
|
||||
//? j |= ((red >>3)<<10)&0x7C00; // mode 5-5-5
|
||||
}
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
// Cache une image contenant des icônes.
|
||||
|
||||
bool CPixmap::Cache(int channel, char *pFilename, POINT totalDim, POINT iconDim,
|
||||
|
1
pixmap.h
1
pixmap.h
@ -22,7 +22,6 @@ public:
|
||||
bool Flush();
|
||||
void Fill(RECT rect, COLORREF color);
|
||||
|
||||
int SearchColor(int red, int green, int blue);
|
||||
bool Cache(int channel, char *pFilename, POINT totalDim, POINT iconDim, bool bUsePalette);
|
||||
bool Cache(int channel, char *pFilename, POINT totalDim, bool bUsePalette);
|
||||
bool Cache(int channel, SDL_Surface *surface, POINT totalDim);
|
||||
|
Loading…
x
Reference in New Issue
Block a user