diff --git a/client/CBitmapHandler.cpp b/client/CBitmapHandler.cpp index cdd5582fa..5fb8a4388 100644 --- a/client/CBitmapHandler.cpp +++ b/client/CBitmapHandler.cpp @@ -70,7 +70,7 @@ SDL_Surface * BitmapHandler::loadH3PCX(ui8 * pcx, size_t size) tp.r = pcx[it++]; tp.g = pcx[it++]; tp.b = pcx[it++]; - CSDL_Ext::colorSetAlpha(tp,SDL_ALPHA_OPAQUE); + tp.a = SDL_ALPHA_OPAQUE; ret->format->palette->colors[i] = tp; } } @@ -142,7 +142,7 @@ SDL_Surface * BitmapHandler::loadBitmapFromDir(std::string path, std::string fna { //set correct value for alpha\unused channel for (int i=0; i < ret->format->palette->ncolors; i++) - CSDL_Ext::colorSetAlpha(ret->format->palette->colors[i],SDL_ALPHA_OPAQUE); + ret->format->palette->colors[i].a = SDL_ALPHA_OPAQUE; } } else diff --git a/client/CDefHandler.cpp b/client/CDefHandler.cpp index 276013c36..2bd386c5f 100644 --- a/client/CDefHandler.cpp +++ b/client/CDefHandler.cpp @@ -67,7 +67,7 @@ void CDefHandler::openFromMemory(ui8 *table, const std::string & name) palette[it].r = de.palette[it].R; palette[it].g = de.palette[it].G; palette[it].b = de.palette[it].B; - CSDL_Ext::colorSetAlpha(palette[it],SDL_ALPHA_OPAQUE); + palette[it].a = SDL_ALPHA_OPAQUE; } // The SDefEntryBlock starts just after the SDefEntry diff --git a/client/Graphics.cpp b/client/Graphics.cpp index 4bf27ac63..bd4c4f649 100644 --- a/client/Graphics.cpp +++ b/client/Graphics.cpp @@ -58,7 +58,7 @@ void Graphics::loadPaletteAndColors() col.r = pals[startPoint++]; col.g = pals[startPoint++]; col.b = pals[startPoint++]; - CSDL_Ext::colorSetAlpha(col,SDL_ALPHA_OPAQUE); + col.a = SDL_ALPHA_OPAQUE; startPoint++; playerColorPalette[i] = col; } @@ -74,7 +74,7 @@ void Graphics::loadPaletteAndColors() neutralColorPalette[i].g = reader.readUInt8(); neutralColorPalette[i].b = reader.readUInt8(); reader.readUInt8(); // this is "flags" entry, not alpha - CSDL_Ext::colorSetAlpha(neutralColorPalette[i], SDL_ALPHA_OPAQUE); + neutralColorPalette[i].a = SDL_ALPHA_OPAQUE; } //colors initialization SDL_Color colors[] = { @@ -92,8 +92,11 @@ void Graphics::loadPaletteAndColors() { playerColors[i] = colors[i]; } - neutralColor->r = 0x84; neutralColor->g = 0x84; neutralColor->b = 0x84; //gray - CSDL_Ext::colorSetAlpha(*neutralColor,SDL_ALPHA_OPAQUE); + //gray + neutralColor->r = 0x84; + neutralColor->g = 0x84; + neutralColor->b = 0x84; + neutralColor->a = SDL_ALPHA_OPAQUE; } void Graphics::initializeBattleGraphics() diff --git a/client/battle/CCreatureAnimation.cpp b/client/battle/CCreatureAnimation.cpp index 1544cee75..a91781b35 100644 --- a/client/battle/CCreatureAnimation.cpp +++ b/client/battle/CCreatureAnimation.cpp @@ -178,7 +178,7 @@ CCreatureAnimation::CCreatureAnimation(std::string name, TSpeedController contro elem.r = reader.readUInt8(); elem.g = reader.readUInt8(); elem.b = reader.readUInt8(); - CSDL_Ext::colorSetAlpha(elem,0); + elem.a = SDL_ALPHA_OPAQUE; } for (int i=0; i