Remove 8bit mode

Obsolete and doesn't work

* Remove gbPixelDepth
* Remove 8-bit to 8-bit blitters
* FileNameForBPP now only calls strcopy
This commit is contained in:
Asdow
2025-02-24 21:42:36 +02:00
parent 9c951adfea
commit fffb3a45fb
20 changed files with 644 additions and 6603 deletions
+35 -120
View File
@@ -794,10 +794,7 @@ BOOLEAN InitializeButtonImageManager(INT32 DefaultBuffer, INT32 DefaultPitch, IN
return(FALSE);
}
if(GETPIXELDEPTH()==16)
GenericButtonFillColors[0]=GenericButtonOffNormal[0]->p16BPPPalette[Pix];
else if(GETPIXELDEPTH()==8)
GenericButtonFillColors[0]=COLOR_DKGREY;
GenericButtonFillColors[0]=GenericButtonOffNormal[0]->p16BPPPalette[Pix];
return(TRUE);
}
@@ -3689,145 +3686,63 @@ void DrawGenericButton(GUI_BUTTON *b)
else
ImgNum=1;
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
(INT32)b->YLoc,
(UINT16)ImgNum, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
(INT32)b->YLoc,
(UINT16)ImgNum, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
(INT32)b->YLoc,
(UINT16)ImgNum, &ClipRect );
if(q==0)
ImgNum=5;
else
ImgNum=6;
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
cy, (UINT16)ImgNum, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
cy, (UINT16)ImgNum, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)(b->XLoc + (q*iBorderWidth)),
cy, (UINT16)ImgNum, &ClipRect );
}
// Blit the right side corners
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)b->YLoc,
2, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)b->YLoc,
2, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)b->YLoc,
2, &ClipRect );
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, cy, 7, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, cy, 7, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, cy, 7, &ClipRect );
// Draw the vertical members of the button's borders
NumChunksHigh--;
if(hremain!=0)
{
q=NumChunksHigh;
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
3, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
3, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
3, &ClipRect );
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
4, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
4, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight) - (iBorderHeight-hremain)),
4, &ClipRect );
}
for(q=1;q<NumChunksHigh;q++)
{
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight)),
3, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight)),
3, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
(INT32)b->XLoc,
(INT32)(b->YLoc + (q*iBorderHeight)),
3, &ClipRect );
if(gbPixelDepth==16)
{
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight)),
4, &ClipRect );
}
else if(gbPixelDepth==8)
{
Blt8BPPDataTo8BPPBufferTransparentClip((UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight)),
4, &ClipRect );
}
Blt8BPPDataTo16BPPBufferTransparentClip( (UINT16*)pDestBuf,
uiDestPitchBYTES, BPic,
cx, (INT32)(b->YLoc + (q*iBorderHeight)),
4, &ClipRect );
}
// Unlock buffer