- Timestamp:
- Aug 19, 1999, 8:08:48 PM (26 years ago)
- Location:
- trunk/src/ddraw
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2DDRAW.CPP
r536 r587 26 26 #define KEY_DIRECT2DRAW "\\Software\\Win32OS2\\Direct2\\Draw" 27 27 28 FOURCC SupportedFourCCs[] = {FOURCC_ LUT8,FOURCC_R565,FOURCC_RGB3,FOURCC_RGB4};28 FOURCC SupportedFourCCs[] = {FOURCC_SCRN,FOURCC_LUT8,FOURCC_R565,FOURCC_RGB3,FOURCC_RGB4}; 29 29 //****************************************************************************** 30 30 //****************************************************************************** … … 32 32 Referenced(0), lastError(DD_OK), 33 33 pFrameBuffer(NULL), hwndClient(0), screenwidth(640), 34 screenheight(480), screenbpp(8),PrimaryExists(FALSE) 34 screenheight(480), screenbpp(8),PrimaryExists(FALSE),pPrimSurf(NULL) 35 35 36 36 { … … 337 337 #endif 338 338 339 newpal = new OS2IDirectDrawPalette( me, palsize, lpColorTable, dwFlags);339 newpal = new OS2IDirectDrawPalette((VOID*)me, palsize, lpColorTable, dwFlags); 340 340 341 341 if(newpal == NULL) … … 754 754 { 755 755 #ifdef DEBUG 756 WriteLog(" GetCaps\n");756 WriteLog("DDGetCaps of "); 757 757 #endif 758 758 … … 764 764 // Caller want Driver Caps 765 765 766 WriteLog("Driver\n"); 767 766 768 if(sizeof(DDCAPS)!=lpDDDriverCaps->dwSize) 769 { 770 WriteLog("Size Not Set\n"); 767 771 return(DDERR_INVALIDPARAMS); 768 772 } 769 773 // Clear structure so we only have to set the supported flags 770 774 … … 777 781 778 782 // Now report the CAPs back which we support 779 lpDDDriverCaps->dwCaps = DDCAPS_BLT | // We do blitting780 DDCAPS_BLTCOLORFILL | // We do colorfills781 DDCAPS_COLORKEY | // We support Colorkeying782 DDCAPS_COLORKEYHWASSIST | // But we (may) use the CPU783 DDCAPS_GDI | // Maybe check if we are on Voodoo ?784 DDCAPS_PALETTEVSYNC; // Got VSync783 lpDDDriverCaps->dwCaps = DDCAPS_BLT | // We do blitting 784 DDCAPS_BLTCOLORFILL | // We do colorfills 785 DDCAPS_COLORKEY | // We support Colorkeying 786 DDCAPS_COLORKEYHWASSIST | // But we (may) use the CPU 787 DDCAPS_GDI | // Maybe check if we are on Voodoo ? 788 DDCAPS_PALETTEVSYNC; // Got VSync 785 789 786 790 lpDDDriverCaps->dwCaps2 = DDCAPS2_CERTIFIED | // Who cares so say yes … … 843 847 if(NULL!=lpDDHELCaps) 844 848 { 845 // Caler wants HEL Caps 849 // Caller wants HEL Caps 850 WriteLog(" HEL\n"); 851 846 852 if(sizeof(DDCAPS)!=lpDDHELCaps->dwSize) 853 { 854 WriteLog("Size Not Set\n"); 847 855 return(DDERR_INVALIDPARAMS); 856 } 857 // Clear structure so we only have to set the supported flags 858 859 860 memset(lpDDHELCaps,0,sizeof(DDCAPS)); 861 862 863 // Reset the size 864 lpDDHELCaps->dwSize = sizeof(DDCAPS); 865 866 // Now report the CAPs back which we support 867 lpDDHELCaps->dwCaps = DDCAPS_BLT | // We do blitting 868 DDCAPS_BLTCOLORFILL | // We do colorfills 869 DDCAPS_COLORKEY | // We support Colorkeying 870 DDCAPS_COLORKEYHWASSIST | // But we (may) use the CPU 871 DDCAPS_GDI | // Maybe check if we are on Voodoo ? 872 DDCAPS_PALETTEVSYNC; // Got VSync 873 874 lpDDHELCaps->dwCaps2 = DDCAPS2_CERTIFIED | // Who cares so say yes 875 DDCAPS2_CANRENDERWINDOWED | // Better check for Voodoo ?! 876 DDCAPS2_COPYFOURCC | // yepp memcpy will do this 877 DDCAPS2_NONLOCALVIDMEM | // All surfaces are in memory 878 DDCAPS2_WIDESURFACES; // Any size you want! 879 880 lpDDHELCaps->dwCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 881 882 // lpDDDriverCaps->dwFXCaps = DDFXCAPS_BLTMIRRORUPDOWN; // DIVE supports this, do we also ? 883 // Maybe later add stretching support? 884 885 lpDDHELCaps->dwPalCaps = DDPCAPS_8BIT | // Only 8 Bits pals 886 DDPCAPS_ALLOW256 | // But all 256 colors 887 DDPCAPS_VSYNC | // Vsync yet 888 DDPCAPS_PRIMARYSURFACE; // 889 lpDDHELCaps->dwVidMemTotal = 2048*1024; // total video memory 890 lpDDHELCaps->dwVidMemFree = 2048*1024; // total free video memory 891 lpDDHELCaps->dwNumFourCCCodes; // number of supported FOURCC codes 892 lpDDHELCaps->dwRops[DD_ROP_SPACE]; // supported raster ops 893 lpDDHELCaps->dwSVBCaps = DDCAPS_BLT | // We do blitting 894 DDCAPS_BLTCOLORFILL | // We do colorfills 895 DDCAPS_COLORKEY | // We support Colorkeying 896 DDCAPS_COLORKEYHWASSIST; 897 lpDDHELCaps->dwSVBCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 898 lpDDHELCaps->dwSVBFXCaps; // . 899 lpDDHELCaps->dwSVBRops[DD_ROP_SPACE]; // . 900 lpDDHELCaps->dwVSBCaps = DDCAPS_BLT | // We do blitting 901 DDCAPS_BLTCOLORFILL | // We do colorfills 902 DDCAPS_COLORKEY | // We support Colorkeying 903 DDCAPS_COLORKEYHWASSIST; 904 lpDDHELCaps->dwVSBCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 905 lpDDHELCaps->dwVSBFXCaps; // . 906 lpDDHELCaps->dwVSBRops[DD_ROP_SPACE]; // . 907 lpDDHELCaps->dwSSBCaps = DDCAPS_BLT | // We do blitting 908 DDCAPS_BLTCOLORFILL | // We do colorfills 909 DDCAPS_COLORKEY | // We support Colorkeying 910 DDCAPS_COLORKEYHWASSIST; 911 lpDDHELCaps->dwSSBCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 912 lpDDHELCaps->dwSSBFXCaps; // . 913 lpDDHELCaps->dwSSBRops[DD_ROP_SPACE]; // . 914 lpDDHELCaps->dwSVBCaps2 = DDCAPS2_CANRENDERWINDOWED | // Better check for Voodoo ?! 915 DDCAPS2_COPYFOURCC | // yepp memcpy will do this 916 DDCAPS2_WIDESURFACES; // Any size you want! 917 lpDDHELCaps->dwNLVBCaps = DDCAPS_BLT | // We do blitting 918 DDCAPS_BLTCOLORFILL | // We do colorfills 919 DDCAPS_COLORKEY | // We support Colorkeying 920 DDCAPS_COLORKEYHWASSIST; 921 lpDDHELCaps->dwNLVBCaps2 = DDCAPS2_CANRENDERWINDOWED | // Better check for Voodoo ?! 922 DDCAPS2_COPYFOURCC | // yepp memcpy will do this 923 DDCAPS2_WIDESURFACES; // Any size you want! 924 lpDDHELCaps->dwNLVBCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 925 lpDDHELCaps->dwNLVBFXCaps; // . 926 lpDDHELCaps->dwNLVBRops[DD_ROP_SPACE];// . 848 927 849 928 } -
trunk/src/ddraw/OS2DDRAW.H
r422 r587 7 7 #define APIENTRY _System 8 8 #include "divewrap.h" 9 10 9 #define DEBUG 1 11 10 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \ … … 13 12 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) ) 14 13 #include <fourcc.h> 14 #undef THIS 15 15 #define THIS VOID* 16 16 class OS2IDirectDraw … … 45 45 // also needed so get all the info we can get 46 46 DIVE_CAPS dCaps; 47 VOID *pPrimSurf; 47 48 48 49 private: -
trunk/src/ddraw/OS2PALETTE.CPP
r522 r587 4 4 #include <memory.h> 5 5 #define INITGUID 6 #include "os2ddraw.h" 7 #include "os2clipper.h" 6 8 #include "os2palette.h" 9 #include "os2surface.h" 7 10 #define _OS2WIN_H 8 11 #define FAR … … 11 14 #include <winerror.h> 12 15 13 //****************************************************************************** 14 //****************************************************************************** 15 OS2IDirectDrawPalette::OS2IDirectDrawPalette( OS2IDirectDraw *lpDirectDraw, 16 #undef THIS 17 #define THIS IDirectDrawPalette* 18 19 //****************************************************************************** 20 //****************************************************************************** 21 OS2IDirectDrawPalette::OS2IDirectDrawPalette( VOID *lpDirectDraw, 16 22 int palsize, 17 23 LPPALETTEENTRY lpColorTable, … … 19 25 Referenced(0), os2pal(NULL), 20 26 lastError(DD_OK), lpDraw(NULL) 27 21 28 { 22 29 lpVtbl = &Vtbl; … … 30 37 31 38 lpDraw = lpDirectDraw; 32 lpDraw->Vtbl.AddRef(lpDraw);33 hDive = lpDirectDraw->GetDiveInstance();39 ((OS2IDirectDraw*)lpDraw)->Vtbl.AddRef(lpDraw); 40 hDive = ((OS2IDirectDraw*)lpDirectDraw)->GetDiveInstance(); 34 41 dwCaps = dwPalFlags; 42 hDiveCC = ((OS2IDirectDraw*)lpDirectDraw)->GetCCDiveInstance(); 35 43 36 44 dwSize = palsize; … … 41 49 os2pal = (LPPALETTEENTRY)malloc(palsize*sizeof(PALETTEENTRY)); 42 50 memcpy((char *)os2pal, (char *)lpColorTable, palsize*sizeof(PALETTEENTRY)); 51 52 for(DWORD i=0;i<dwSize;i++) 53 { 54 aPal16[i] = (lpColorTable[i].peBlue>>3) + 55 ((lpColorTable[i].peGreen>>2) <<5) + 56 ((lpColorTable[i].peRed>>3) << 11); 57 aPal24[i] = (lpColorTable[i].peBlue <<8) + 58 (lpColorTable[i].peGreen<<16) + 59 (lpColorTable[i].peRed<<24); 60 } 43 61 } 44 62 //****************************************************************************** … … 48 66 if(os2pal) 49 67 free(os2pal); 50 lpDraw->Vtbl.Release(lpDraw);68 ((OS2IDirectDraw*)lpDraw)->Vtbl.Release((OS2IDirectDraw*)lpDraw); 51 69 } 52 70 //****************************************************************************** … … 175 193 dwNumEntries*sizeof(PALETTEENTRY)); 176 194 177 if(me->fAttachedToPrimary) 178 me->SetPhysPalette(); 179 195 for(DWORD i=0;i<dwNumEntries;i++) 196 { 197 me->aPal16[dwBase+i] = (lpNewEntries[i].peBlue>>3) + 198 ((lpNewEntries[i].peGreen>>2) <<5) + 199 ((lpNewEntries[i].peRed>>3) << 11); 200 me->aPal24[dwBase+i] = (lpNewEntries[i].peBlue <<8) + 201 (lpNewEntries[i].peGreen<<16) + 202 (lpNewEntries[i].peRed<<24); 203 } 204 205 if(8==((OS2IDirectDraw*)me->lpDraw)->dCaps.ulDepth) 206 { 207 if(me->fAttachedToPrimary) 208 me->SetPhysPalette(); 209 } 210 else 211 { 212 if(NULL!=((OS2IDirectDraw*)me->lpDraw)->pPrimSurf) 213 ((OS2IDirectDrawSurface*)((OS2IDirectDraw*)me->lpDraw)->pPrimSurf)->ColorConversion(NULL);; 214 } 215 /* 216 if(NULL!=me->hDiveCC) 217 { 218 DiveSetSourcePalette( me->hDiveCC, 219 dwBase, 220 dwNumEntries, 221 (PBYTE)lpNewEntries); 222 223 } 224 else 225 { 226 // Only usefull if system and game are in 8bit mode 227 // 16bit games don't use palettes and setting the Phys palette 228 // in >8Bit Modes has no effect. 229 230 if(me->fAttachedToPrimary) 231 me->SetPhysPalette(); 232 } 233 */ 180 234 return(DD_OK); 181 235 } … … 199 253 return; 200 254 fAttachedToPrimary = fNewVal; 255 256 /* 201 257 if(fAttachedToPrimary) 202 SetPhysPalette(); 203 204 } 205 //****************************************************************************** 206 //****************************************************************************** 207 258 { 259 if(NULL!=hDiveCC) 260 DiveSetSourcePalette( hDiveCC, 261 0, 262 255, 263 (PBYTE)os2pal); 264 else 265 SetPhysPalette(); 266 } 267 */ 268 } 269 //****************************************************************************** 270 //****************************************************************************** 271 -
trunk/src/ddraw/OS2PALETTE.H
r422 r587 2 2 #define __OS2PALETTE_H__ 3 3 4 #include "os2ddraw.h"5 4 #include "divewrap.h" 6 5 #define FAR … … 27 26 IDirectDrawPaletteVtbl Vtbl; 28 27 29 OS2IDirectDrawPalette( OS2IDirectDraw*lpDirectDraw,28 OS2IDirectDrawPalette( VOID *lpDirectDraw, 30 29 int palsize, 31 30 LPPALETTEENTRY lpColorTable, … … 38 37 int Referenced; 39 38 inline HRESULT GetLastError() { return lastError; }; 39 WORD aPal16[256]; 40 DWORD aPal24[256]; 40 41 private: 41 42 42 43 protected: 43 44 HDIVE hDive; 45 HDIVE hDiveCC; 44 46 HRESULT lastError; 45 47 LPPALETTEENTRY os2pal; 46 OS2IDirectDraw*lpDraw;48 VOID *lpDraw; 47 49 DWORD dwCaps; 48 50 DWORD dwSize; -
trunk/src/ddraw/OS2SURFACE.CPP
r522 r587 6 6 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) ) 7 7 #include <fourcc.h> 8 #define INITGUID 9 #include "os2ddraw.h" 10 #include "os2clipper.h" 11 #include "os2palette.h" 8 12 #include "os2surface.h" 9 13 #include "rectangle.h" … … 154 158 WriteLog("\n"); 155 159 } 160 161 static void _dump_DDSCAPS2(DWORD flagmask) { 162 int i; 163 const struct { 164 DWORD mask; 165 char *name; 166 } flags[] = { 167 #define FE(x) { x, #x}, 168 FE(DDSCAPS2_HARDWAREDEINTERLACE) 169 FE(DDSCAPS2_HINTANTIALIASING) 170 FE(DDSCAPS2_HINTDYNAMIC) 171 FE(DDSCAPS2_HINTSTATIC) 172 FE(DDSCAPS2_OPAQUE) 173 FE(DDSCAPS2_TEXTUREMANAGE) 174 }; 175 for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++) 176 if (flags[i].mask & flagmask) 177 WriteLog("%s ",flags[i].name); 178 WriteLog("\n"); 179 } 180 156 181 157 182 static void _dump_DDSD(DWORD flagmask) { … … 553 578 height = DDSurfaceDesc.dwHeight; 554 579 580 lpDraw->pPrimSurf = this; 581 555 582 lastError = DD_OK; 556 583 return; … … 591 618 { 592 619 WriteLog(" Use Screen Format :"); 593 dwBpp = dwBytesPPDive << 3; // No use Screenformat620 dwBpp = lpDraw->GetScreenBpp(); // No use Screenformat 594 621 lpDDSurfaceDesc->ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); 595 622 lpDDSurfaceDesc->ddpfPixelFormat.dwFourCC = (DWORD) lpDraw->GetScreenFourCC(); … … 740 767 dwPitchFB = lpDDSurfaceDesc->dwWidth * (dwBpp<8?1:dwBpp/8); 741 768 dwPitchFB = (dwPitchFB +7) & ~7; // Align on QWords 742 743 769 DDSurfaceDesc.lPitch = dwPitchFB; 744 770 lpDDSurfaceDesc->lPitch = dwPitchFB; … … 764 790 pFrameBuffer = (char*)(((int)pFBreal + 7) & ~7); // align to QWORD 765 791 766 WriteLog( " Framebuffer @ %08X QWAligned @ %08X with a Pitch of %d ",792 WriteLog( " Framebuffer @ %08X QWAligned @ %08X with a Pitch of %d\n", 767 793 pFBreal, pFrameBuffer, dwPitchFB); 768 794 … … 780 806 { 781 807 WriteLog(" Alloc CCBuf "); 808 dwPitchDB = (lpDDSurfaceDesc->dwWidth * (lpDraw->dCaps.ulDepth/8) +7) & ~7; 782 809 if(Mainchain) 783 810 { … … 790 817 lpDDSurfaceDesc->dwWidth, 791 818 lpDDSurfaceDesc->dwHeight, 792 (lpDDSurfaceDesc->dwWidth * (lpDraw->dCaps.ulDepth/8) +7) & ~7,819 dwPitchDB, 793 820 (PBYTE)pDiveBuffer); 794 821 } 795 822 else 796 823 { 797 WriteLog("with malloc"); 824 WriteLog( "with malloc (%dx%d) Pitch %d ", 825 lpDDSurfaceDesc->dwHeight, 826 lpDDSurfaceDesc->dwWidth, 827 dwPitchDB); 798 828 // No so we must create the Divebuffer to do the colortranslation 799 829 // and blit to the real framebuffer on Unlock to do color conversion 800 830 pDiveBuffer = (char*)malloc( lpDDSurfaceDesc->dwHeight * 801 ((lpDDSurfaceDesc->dwWidth * (lpDraw->dCaps.ulDepth/8) +7) & ~7));831 dwPitchDB); 802 832 } 833 WriteLog( " @ %08X\n", pDiveBuffer); 803 834 } 804 835 … … 1154 1185 void OS2IDirectDrawSurface::ColorConversion(LPRECT lpRect) 1155 1186 { 1187 char *pSrc,*pDst,*pSLine,*pDLine; 1188 DWORD CCwidth,CCheight,x,y; 1189 DWORD *pPal24; 1190 WORD *pPal16; 1191 1192 if(NULL== lpDraw->pPrimSurf) 1193 { 1194 WriteLog("No Primary Surface! => No CC\n"); 1195 return; 1196 } 1197 1198 if(NULL== ((OS2IDirectDrawSurface*)lpDraw->pPrimSurf)->lpPalette) 1199 { 1200 WriteLog("No DDrawpalette defined!=> No CC\n"); 1201 return; 1202 } 1203 1204 if(NULL==lpRect) 1205 { 1206 pSrc = pFrameBuffer; 1207 pDst = pDiveBuffer; 1208 CCwidth = width; 1209 CCheight = height; 1210 } 1211 else 1212 { 1213 // ToDo: Check why the top/bottom values come in swaped here 1214 // for now simply reverse them with the following 3 lines 1215 y = lpRect->top; 1216 lpRect->top = lpRect->bottom; 1217 lpRect->bottom = y; 1218 // end of hack 1219 pSrc = pFrameBuffer + 1220 (lpRect->top * dwPitchFB) + 1221 (lpRect->left* (lpDraw->dCaps.ulDepth/8)); 1222 pDst = pDiveBuffer + 1223 (lpRect->top * dwPitchDB) + 1224 (lpRect->left* dwBytesPPDive); 1225 CCwidth = lpRect->right - lpRect->left; 1226 CCheight = lpRect->bottom - lpRect->top; 1227 1228 } 1229 1230 WriteLog( "H: %d W: %d\n SRC @ %08X\n DST @ %08X\n", 1231 CCheight, CCwidth, pSrc,pDst); 1232 1233 pSLine = pSrc; 1234 pDLine = pDst; 1235 1236 switch(lpDraw->dCaps.ulDepth) 1237 { 1238 case 8: 1239 WriteLog(" 8Bit target CC not implemented\n"); 1240 break; 1241 case 15: 1242 WriteLog(" 15 Bit not implemented using 16bit might look ugly\n"); 1243 case 16: 1244 if(8==lpDraw->GetScreenBpp()) 1245 { 1246 pPal16 = ((OS2IDirectDrawSurface*)lpDraw->pPrimSurf)->lpPalette->aPal16; 1247 WriteLog("8->16Bit CC\n"); 1248 for(y=0;CCheight;CCheight--,y++) 1249 { 1250 WriteLog("Converting Line %d\n",y); 1251 for(x=0;x<width;x++) 1252 { 1253 *((WORD*)pDLine) = pPal16[pSLine[x]]; 1254 } 1255 pSLine += dwPitchFB; 1256 pDLine += dwPitchDB; 1257 } 1258 } 1259 else 1260 { 1261 WriteLog("%d ->16Bit Not implemented",lpDraw->GetScreenBpp()); 1262 } 1263 break; 1264 case 24: 1265 if(8==lpDraw->GetScreenBpp()) 1266 { 1267 WriteLog("8->24Bit CC"); 1268 } 1269 else 1270 { 1271 WriteLog("%d ->16Bit Not implemented",lpDraw->GetScreenBpp()); 1272 } 1273 break; 1274 case 32: 1275 if(8==lpDraw->GetScreenBpp()) 1276 { 1277 WriteLog("8->32Bit CC"); 1278 } 1279 else 1280 { 1281 WriteLog("%d ->16Bit Not implemented",lpDraw->GetScreenBpp()); 1282 } 1283 break; 1284 default: 1285 #ifdef DEBUG 1286 WriteLog( "Unexpected Screen Bitdepth %d\n", 1287 lpDraw->dCaps.ulDepth); 1288 #endif 1289 break; 1290 } 1291 1292 /* 1156 1293 SETUP_BLITTER sBlt; 1157 1294 ULONG ulDN1, ulDN2; … … 1182 1319 sBlt.lDstPosY = sBlt.ulSrcPosY; 1183 1320 sBlt.ulNumDstRects = DIVE_FULLY_VISIBLE; 1321 1322 WriteLog( "Colorconversion:\n FCC SRC %08X\n FCC DST %08X\n", 1323 sBlt.fccSrcColorFormat, 1324 sBlt.fccDstColorFormat ); 1184 1325 1185 1326 rc = DiveAllocImageBuffer( hDiveCC, … … 1190 1331 dwPitchFB, 1191 1332 (PBYTE)pFrameBuffer); 1192 WriteLog("AllocDiveSrc Buffer rc= %X\n",rc);1333 WriteLog("AllocDiveSrc Buffer rc= 0x%08X\n",rc); 1193 1334 1194 1335 rc = DiveAllocImageBuffer( hDiveCC, … … 1199 1340 dwPitchDB, 1200 1341 (PBYTE)pDiveBuffer); 1201 WriteLog("AllocDiveDst Buffer rc= %Xd\n",rc);1342 WriteLog("AllocDiveDst Buffer rc= 0x%08X\n",rc); 1202 1343 1203 1344 rc = DiveSetupBlitter( hDiveCC, … … 1219 1360 1220 1361 WriteLog("Free dst rc= %X\n",rc); 1221 1362 */ 1222 1363 } 1223 1364 //****************************************************************************** … … 2571 2712 BlitWidth = (SrcRect.right - SrcRect.left) * src->dwBytesPPDive; 2572 2713 2573 if(dwTrans & DDBLTFAST_NOCOLORKEY) 2714 // Remove unsupported wait flag 2715 dwTrans &= ~DDBLTFAST_WAIT; 2716 2717 if(DDBLTFAST_NOCOLORKEY == dwTrans ) 2574 2718 { 2575 2719 WriteLog("Solid Blit"); … … 2593 2737 else 2594 2738 { 2595 WriteLog("TransBlit ");2739 WriteLog("TransBlit\n"); 2596 2740 2597 2741 if(dwTrans & DDBLTFAST_SRCCOLORKEY) 2598 2742 { 2743 WriteLog("Trans SRC\n"); 2599 2744 // transparent source 2600 2745 dwSrcColor = src->DDSurfaceDesc.ddckCKSrcBlt.dwColorSpaceLowValue; 2601 2746 if(dwTrans & DDBLTFAST_DESTCOLORKEY) 2602 2747 { 2748 WriteLog("And Dest Colorkey"); 2603 2749 dwDestColor = dest->DDSurfaceDesc.ddckCKDestBlt.dwColorSpaceLowValue; 2604 2750 // Source and dest colorkeying … … 2697 2843 // This MMX detection should be moved into OS2Draw 2698 2844 // and into the surface constructor a setup for blitting pointers 2699 2845 WriteLog("Only Src ColorKey"); 2700 2846 switch(dest->dwBytesPPDive) 2701 2847 { … … 2768 2914 if(dwTrans & DDBLTFAST_DESTCOLORKEY) 2769 2915 { 2916 WriteLog("DestColorKey\n"); 2917 2770 2918 dwDestColor = dest->DDSurfaceDesc.ddckCKDestBlt.dwColorSpaceLowValue; 2771 2919 switch(dest->dwBytesPPDive) … … 2844 2992 } // End switch 2845 2993 } 2994 else 2995 { 2996 WriteLog("Unexpected Flags"); 2997 } 2846 2998 } 2847 2999 } … … 3349 3501 3350 3502 lpDDCaps->dwCaps = me->DDSurfaceDesc.ddsCaps.dwCaps; 3351 3503 #ifdef DEBUG 3504 _dump_DDSCAPS(lpDDCaps->dwCaps); 3505 #endif 3352 3506 return(DD_OK); 3353 3507 } … … 3365 3519 3366 3520 memcpy(lpDDCaps, &(me->DDSurfaceDesc.ddsCaps), sizeof(DDSCAPS2) ); 3521 #ifdef DEBUG 3522 _dump_DDSCAPS(lpDDCaps->dwCaps); 3523 _dump_DDSCAPS2(lpDDCaps->dwCaps2); 3524 3525 #endif 3367 3526 3368 3527 return(DD_OK); … … 4098 4257 // primary surface => doesn't modify physical palette 4099 4258 if(me->surfaceType & DDSCAPS_PRIMARYSURFACE) 4259 { 4100 4260 me->lpPalette->SetIsPrimary(FALSE); 4101 4261 } 4102 4262 me->lpPalette->Vtbl.Release((IDirectDrawPalette*)me->lpPalette); 4103 4263 me->lpPalette = NULL; … … 4128 4288 4129 4289 if(me->surfaceType & DDSCAPS_PRIMARYSURFACE) 4290 { 4130 4291 me->lpPalette->SetIsPrimary(TRUE); 4131 4292 } 4132 4293 me->lpVtbl->ChangeUniquenessValue(me); 4133 4294 -
trunk/src/ddraw/OS2SURFACE.H
r422 r587 2 2 #define __OS2SURFACE_H__ 3 3 #define FAR 4 #define INITGUID5 #include "os2ddraw.h"6 #include "os2clipper.h"7 #include "os2palette.h"8 4 #include "divewrap.h" 9 5 #include <commctrl.h>
Note:
See TracChangeset
for help on using the changeset viewer.