Ignore:
Timestamp:
Oct 29, 1999, 12:39:29 AM (26 years ago)
Author:
hugh
Message:

Changed to put logging info back to common logfile odin32_x.log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/OS2SURFACE.CPP

    r1434 r1502  
    1414#define _OS2WIN_H
    1515#define FAR
    16 #include "misc.h"
     16#include <misc.h>
    1717#include "asmutil.h"
    1818#include <winerror.h>
     
    312312  for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
    313313     if (flags[i].mask & flagmask) {
    314         WriteLog("%s ",flags[i].name);
     314        dprintf(("%s ",flags[i].name));
    315315     };
    316   WriteLog("\n");
     316  dprintf(("\n"));
    317317
    318318}
     
    332332  for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
    333333    if (flags[i].mask & flagmask)
    334       WriteLog("%s ",flags[i].name);
    335   WriteLog("\n");
     334      dprintf(("%s ",flags[i].name));
     335  dprintf(("\n"));
    336336}
    337337
     
    372372  for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
    373373    if (flags[i].mask & flagmask)
    374       WriteLog("%s ",flags[i].name);
    375   WriteLog("\n");
     374      dprintf(("%s ",flags[i].name));
     375  dprintf(("\n"));
    376376}
    377377
     
    416416  for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
    417417    if (flags[i].mask & flagmask)
    418       WriteLog("%s ",flags[i].name);
    419   WriteLog("\n");
     418      dprintf(("%s ",flags[i].name));
     419  dprintf(("\n"));
    420420}
    421421
     
    436436  for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
    437437    if (flags[i].mask & flagmask)
    438       WriteLog("%s ",flags[i].name);
    439   WriteLog("\n");
     438      dprintf(("%s ",flags[i].name));
     439  dprintf(("\n"));
    440440}
    441441
     
    467467  for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
    468468    if (flags[i].mask & flagmask)
    469       WriteLog("%s ",flags[i].name);
    470   WriteLog("\n");
     469      dprintf(("%s ",flags[i].name));
     470  dprintf(("\n"));
    471471}
    472472
     
    495495  for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
    496496    if (flags[i].mask & flagmask)
    497       WriteLog("%s ",flags[i].name);
    498   WriteLog("\n");
     497      dprintf(("%s ",flags[i].name));
     498  dprintf(("\n"));
    499499}
    500500
    501501static void _dump_pixelformat(LPDDPIXELFORMAT pf) {
    502502  _dump_DDCOLORKEY(pf->dwFlags);
    503   WriteLog("dwFourCC : %ld\n", pf->dwFourCC);
    504   WriteLog("RBG bit cbout : %ld\n", pf->dwRGBBitCount);
    505   WriteLog("Masks : R %08lx  G %08lx  B %08lx  A %08lx\n",
    506        pf->dwRBitMask, pf->dwGBitMask, pf->dwBBitMask, pf->dwRGBAlphaBitMask);
     503  dprintf(("dwFourCC : %ld\n", pf->dwFourCC));
     504  dprintf(("RBG bit cbout : %ld\n", pf->dwRGBBitCount));
     505  dprintf(("Masks : R %08lx  G %08lx  B %08lx  A %08lx\n",
     506       pf->dwRBitMask, pf->dwGBitMask, pf->dwBBitMask, pf->dwRGBAlphaBitMask));
    507507}
    508508
     
    605605  {
    606606    #ifdef DEBUG
    607       WriteLog("Internal : Error creating DPA for MipMaps\n");
     607      dprintf(("Internal : Error creating DPA for MipMaps\n"));
    608608    #endif
    609609    lastError = DDERR_OUTOFMEMORY ;
     
    615615  {
    616616    #ifdef DEBUG
    617       WriteLog("Internal : Error creating DPA for attached surfaces\n");
     617      dprintf(("Internal : Error creating DPA for attached surfaces\n"));
    618618    #endif
    619619    lastError = DDERR_OUTOFMEMORY ;
     
    625625  {
    626626    #ifdef DEBUG
    627       WriteLog("Internal : Error creating DPA for Locked Rectangles\n");
     627      dprintf(("Internal : Error creating DPA for Locked Rectangles\n"));
    628628    #endif
    629629    lastError = DDERR_OUTOFMEMORY ;
     
    635635  {
    636636    #ifdef DEBUG
    637       WriteLog("Internal : Error creating DPA for priva surface Data\n");
     637      dprintf(("Internal : Error creating DPA for priva surface Data\n"));
    638638    #endif
    639639    lastError = DDERR_OUTOFMEMORY ;
     
    649649    {
    650650      #ifdef DEBUG
    651         WriteLog("Primary surface!\n");
     651        dprintf(("Primary surface!\n"));
    652652      #endif
    653653
     
    655655      {
    656656        #ifdef DEBUG
    657           WriteLog("Primary surface already exits!\n");
     657          dprintf(("Primary surface already exits!\n"));
    658658        #endif
    659659        lastError = DDERR_PRIMARYSURFACEALREADYEXISTS;
     
    667667      {
    668668        // Dx doc says passing width,height etc. for primary surface in not permitted!!
    669         WriteLog("Invalid parameters\n\n");
     669        dprintf(("Invalid parameters\n\n"));
    670670        lastError = DDERR_INVALIDPARAMS;
    671671        return;
     
    677677      if( lpDraw->dCaps.ulDepth == lpDraw->GetScreenBpp() )
    678678      {
    679         WriteLog("DirectScreenAccess possible\n");
     679        dprintf(("DirectScreenAccess possible\n"));
    680680
    681681        // Yes so direct access to framebuffer is possible
     
    692692        // and blit to the real framebuffer on Unlock to do color conversion
    693693
    694         WriteLog( "Need Color conversation %d => %d Bit\n",
     694        dprintf( ("Need Color conversation %d => %d Bit\n",
    695695                  lpDraw->GetScreenBpp(),
    696696                  lpDraw->dCaps.ulDepth
    697                 );
     697                ));
    698698
    699699        dwPitchFB = (lpDraw->GetScreenWidth() * lpDraw->GetScreenBpp() +7) & ~7;
     
    714714
    715715      #ifdef DEBUG
    716         WriteLog("Setting up Surface\n");
     716        dprintf(("Setting up Surface\n"));
    717717      #endif
    718718      DDSurfaceDesc.dwFlags     |= DDSD_WIDTH | DDSD_HEIGHT |
     
    774774          DDSurfaceDesc.dwFlags    &= ~DDSD_PIXELFORMAT;
    775775          #ifdef DEBUG
    776             WriteLog("Unexpected BitDepth : %d\n",lpDraw->GetScreenBpp());
     776            dprintf(("Unexpected BitDepth : %d\n",lpDraw->GetScreenBpp()));
    777777          #endif
    778778          break;
     
    780780
    781781      #ifdef DEBUG
    782         WriteLog("Surface set up, checking other Caps\n");
     782        dprintf(("Surface set up, checking other Caps\n"));
    783783      #endif
    784784
     
    786786      {
    787787        #ifdef DEBUG
    788           WriteLog("Complex Surface\n");
     788          dprintf(("Complex Surface\n"));
    789789        #endif
    790790
     
    792792        {
    793793          #ifdef DEBUG
    794             WriteLog("Backbuffer # = %d\n",lpDDSurfaceDesc->dwBackBufferCount);
     794            dprintf(("Backbuffer # = %d\n",lpDDSurfaceDesc->dwBackBufferCount));
    795795          #endif
    796796          memset( &ComplexSurfaceDesc,
     
    824824          if (BackBuffer->GetLastError()==DD_OK)
    825825          {
    826             WriteLog("created backbuffer");
     826            dprintf(("created backbuffer"));
    827827            // Our Primary Buffer is also the frontbuffer of a flipchain
    828828            DDSurfaceDesc.ddsCaps.dwCaps    |= DDSCAPS_FRONTBUFFER | DDSCAPS_FLIP;
     
    832832          else
    833833          {
    834             WriteLog("Error creating backbuffer");
     834            dprintf(("Error creating backbuffer"));
    835835          }
    836836        }
     
    838838        {
    839839          #ifdef DEBUG
    840             WriteLog("Unsupported Complex Surface\n");
     840            dprintf(("Unsupported Complex Surface\n"));
    841841            _dump_DDSCAPS(lpDDSurfaceDesc->dwFlags);
    842842          #endif
     
    866866      DWORD dwBpp;
    867867      DWORD dwCaps;
    868       WriteLog( " Requested Size %dx%d\n",
     868      dprintf(( " Requested Size %dx%d\n",
    869869                DDSurfaceDesc.dwWidth,
    870                 DDSurfaceDesc.dwHeight);
     870                DDSurfaceDesc.dwHeight));
    871871
    872872      if(DDSurfaceDesc.dwFlags & DDSD_PIXELFORMAT)         // Pixelformat passed in ?
    873873      {
    874         WriteLog(" Pixelformat requested :");
     874        dprintf((" Pixelformat requested :"));
    875875        // YES use it
    876876        if(DDSurfaceDesc.ddpfPixelFormat.dwFlags & DDPF_RGB)
     
    888888      else
    889889      {
    890         WriteLog(" Use Screen Format :");
     890        dprintf((" Use Screen Format :"));
    891891        dwBpp = lpDraw->GetScreenBpp(); // No use Screenformat
    892892        lpDDSurfaceDesc->ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
     
    932932            DDSurfaceDesc.dwFlags    &= ~DDSD_PIXELFORMAT;
    933933            #ifdef DEBUG
    934               WriteLog("Unexpected BitDepth : %d\n",lpDraw->GetScreenBpp());
     934              dprintf(("Unexpected BitDepth : %d\n",lpDraw->GetScreenBpp()));
    935935            #endif
    936936            break;
     
    939939      }
    940940
    941       WriteLog("%d Bits\n",dwBpp);
     941      dprintf(("%d Bits\n",dwBpp));
    942942
    943943      // three possible situaltions
     
    953953        // 1.
    954954
    955         WriteLog(" Usersupplied Surface\n");
     955        dprintf((" Usersupplied Surface\n"));
    956956
    957957        if(NULL==DDSurfaceDesc.lpSurface)
     
    10051005          // 2.
    10061006
    1007           WriteLog(" Alloc on Load Texture?!\n");
     1007          dprintf((" Alloc on Load Texture?!\n"));
    10081008
    10091009          dwCaps &= ~DDSCAPS_ALLOCONLOAD; // remove flag
     
    10221022          // This surface isn't allocated yet, but when the texture is loaded
    10231023          #ifdef DEBUG
    1024             WriteLog("Warning : Delayed memory allocation on request\n");
     1024            dprintf(("Warning : Delayed memory allocation on request\n"));
    10251025          #endif
    10261026          DDSurfaceDesc.lpSurface = NULL;
     
    10311031          // 3.
    10321032
    1033           WriteLog(" Alloc now!\n");
     1033          dprintf((" Alloc now!\n"));
    10341034
    10351035          lpDDSurfaceDesc->dwFlags  |= DDSD_PITCH|DDSD_LPSURFACE;
     
    10441044            if(dwBpp<8)
    10451045            {
    1046               WriteLog("1 or 4 Bit Surface encountered may not work !");
     1046              dprintf(("1 or 4 Bit Surface encountered may not work !"));
    10471047            }
    10481048          #endif
     
    10611061          pFrameBuffer = (char*)(((int)pFBreal + 7) & ~7); // align to QWORD
    10621062
    1063           WriteLog( " Framebuffer @ %08X QWAligned @ %08X with a Pitch of %d\n",
    1064                     pFBreal, pFrameBuffer, dwPitchFB);
     1063          dprintf((" Framebuffer @ %08X QWAligned @ %08X with a Pitch of %d\n",
     1064                    pFBreal, pFrameBuffer, dwPitchFB));
    10651065
    10661066          lpDDSurfaceDesc->lpSurface = pFrameBuffer;
     
    10701070          if( (lpDraw->dCaps.ulDepth ) == dwBpp )
    10711071          {
    1072             WriteLog(" No CC_Buffer needed\n");
     1072            dprintf((" No CC_Buffer needed\n"));
    10731073            // Yes => No Colorconversion is needed so point to the same buffer
    10741074            pDiveBuffer  = pFrameBuffer;
     
    10761076          else
    10771077          {
    1078             WriteLog(" Alloc CCBuf ");
     1078            dprintf((" Alloc CCBuf "));
    10791079            dwPitchDB = (lpDDSurfaceDesc->dwWidth * (lpDraw->dCaps.ulDepth/8) +7) & ~7;
    10801080            if(Mainchain)
    10811081            {
    1082               WriteLog("with DIVE\n");
     1082              dprintf(("with DIVE\n"));
    10831083              // This surface is part of flipchain with the primary surface use dive to assoc memory
    10841084              pDiveBuffer = (char*)malloc( lpDDSurfaceDesc->dwHeight *
     
    10921092                                         dwPitchDB,
    10931093                                         (PBYTE)pDiveBuffer);
    1094                WriteLog("rc = 0x%08X\n",rc);
     1094               dprintf(("rc = 0x%08X\n",rc));
    10951095            }
    10961096            else
    10971097            {
    1098               WriteLog( "with malloc (%dx%d) Pitch %d ",
     1098              dprintf( ("with malloc (%dx%d) Pitch %d ",
    10991099                        lpDDSurfaceDesc->dwHeight,
    11001100                        lpDDSurfaceDesc->dwWidth,
    1101                         dwPitchDB);
     1101                        dwPitchDB));
    11021102              // No so we must create the Divebuffer to do the colortranslation
    11031103              // and blit to the real framebuffer on Unlock to do color conversion
     
    11051105                                           dwPitchDB);
    11061106            }
    1107             WriteLog( "  @ %08X\n", pDiveBuffer);
     1107            dprintf(( " @ %08X\n", pDiveBuffer));
    11081108          }
    11091109
     
    11191119        dwCaps &= ~DDSCAPS_COMPLEX;
    11201120        #ifdef DEBUG
    1121           WriteLog("Complex Surface\n");
     1121          dprintf(("Complex Surface\n"));
    11221122        #endif
    11231123
     
    11261126          lpDDSurfaceDesc->dwFlags &= ~DDSD_BACKBUFFERCOUNT;
    11271127          #ifdef DEBUG
    1128             WriteLog("Backbuffer # = %d\n",lpDDSurfaceDesc->dwBackBufferCount);
     1128            dprintf(("Backbuffer # = %d\n",lpDDSurfaceDesc->dwBackBufferCount));
    11291129          #endif
    11301130          memcpy(&ComplexSurfaceDesc,lpDDSurfaceDesc,sizeof(DDSURFACEDESC2));
     
    11621162          lpDDSurfaceDesc->dwFlags &= ~DDSD_MIPMAPCOUNT;
    11631163          #ifdef DEBUG
    1164             WriteLog("Mipmpa # = %d\n",lpDDSurfaceDesc->dwMipMapCount);
     1164            dprintf(("Mipmpa # = %d\n",lpDDSurfaceDesc->dwMipMapCount));
    11651165          #endif
    11661166          memcpy(&ComplexSurfaceDesc,lpDDSurfaceDesc,sizeof(DDSURFACEDESC2));
     
    11701170          {
    11711171            #ifdef DEBUG
    1172               WriteLog("Creating MipMap %d\n",i);
     1172              dprintf(("Creating MipMap %d\n",i));
    11731173            #endif
    11741174            // Mpmaps shirnk by 2
     
    11871187              lastError = MipMapSurface->GetLastError();
    11881188              #ifdef DEBUG
    1189                 WriteLog("Attached surface creation returned error %d\n",lastError);
     1189                dprintf(("Attached surface creation returned error %d\n",lastError));
    11901190              #endif
    11911191              return;
     
    11961196        #ifdef DEBUG
    11971197          if(lpDDSurfaceDesc->dwFlags)
    1198             WriteLog("Unsupported Complex Surface\n");
     1198            dprintf(("Unsupported Complex Surface\n"));
    11991199        #endif
    12001200      } // Endif DDSCAPS_COMPLEX
     
    12071207  else
    12081208  {
    1209     WriteLog("CAPS not valid\n");
     1209    dprintf(("CAPS not valid\n"));
    12101210    lastError = DDERR_INVALIDPARAMS;
    12111211  }
    12121212  #ifdef DEBUG
    1213     WriteLog("Buf %X Screen Caps (%d,%d), bitcount %d\n\n", this, lpDraw->GetScreenHeight(), lpDraw->GetScreenWidth(),
    1214     lpDraw->dCaps.ulDepth);
     1213    dprintf(("Buf %X Screen Caps (%d,%d), bitcount %d\n\n", this, lpDraw->GetScreenHeight(), lpDraw->GetScreenWidth(),
     1214    lpDraw->dCaps.ulDepth));
    12151215    if(DD_OK!=lastError)
    12161216    {
    1217       WriteLog("Some Error Check Flags\n");
     1217      dprintf(("Some Error Check Flags\n"));
    12181218      _dump_DDSCAPS(lpDDSurfaceDesc->dwFlags);
    12191219    }
     
    12321232  WORD  *pPal16;
    12331233  #ifdef DEBUG
    1234     WriteLog("ColorFill with %08X\n", dwFillColor);
     1234    dprintf(("ColorFill with %08X\n", dwFillColor));
    12351235  #endif
    12361236
     
    12381238  {
    12391239    #ifdef DEBUG
    1240       WriteLog("Fill only Rect(%d,%d)(%d,%d)\n", lpDestRect->left, lpDestRect->top,
    1241                lpDestRect->right, lpDestRect->bottom);
     1240      dprintf(("Fill only Rect(%d,%d)(%d,%d)\n", lpDestRect->left, lpDestRect->top,
     1241               lpDestRect->right, lpDestRect->bottom));
    12421242    #endif
    12431243    FillWidth  = lpDestRect->right - lpDestRect->left;
     
    12491249  else
    12501250  {
    1251     WriteLog("Fill all at addr ");
     1251    dprintf(("Fill all at addr "));
    12521252    FillWidth  = width;
    12531253    FillHeight = height -1;
    12541254    pLine = pDiveBuffer;
    12551255  }
    1256   WriteLog("0x%08X (%d/%d) at\n", pLine,FillWidth,FillHeight);
     1256  dprintf(("0x%08X (%d/%d) at\n", pLine,FillWidth,FillHeight));
    12571257
    12581258  if(pDiveBuffer!=pFrameBuffer)
     
    12681268                                ((DefaultPalette[i*3+1]>>2) <<5) +
    12691269                                ((DefaultPalette[i*3]>>3) << 11);
    1270           WriteLog( " # %d : RGB=%02X/%02X/%02X => %04X\n",
     1270          dprintf(( " # %d : RGB=%02X/%02X/%02X => %04X\n",
    12711271                    i,
    12721272                    DefaultPalette[i*3],
    12731273                    DefaultPalette[i*3+1],
    12741274                    DefaultPalette[i*3+2],
    1275                     wDefaultPalete16[i]);
     1275                    wDefaultPalete16[i]));
    12761276         // aPal24[i] = (lpColorTable[i].peBlue <<8) +
    12771277         //             (lpColorTable[i].peGreen<<16) +
     
    12921292  {
    12931293    case 1:
    1294       WriteLog("8 Bit\n");
     1294      dprintf(("8 Bit\n"));
    12951295      dwColor = (dwFillColor<<24) + (dwFillColor<<16) +
    12961296                (dwFillColor<<8)  + (dwFillColor);
     
    13051305      break;
    13061306    case 2:
    1307       WriteLog("16 Bit\n");
     1307      dprintf(("16 Bit\n"));
    13081308      if(pDiveBuffer!=pFrameBuffer)
    13091309      {
     
    13121312      }
    13131313      dwColor = (dwFillColor<<16) + (dwFillColor);
    1314       WriteLog("Fill with 0x%08X\n",dwColor);
     1314      dprintf(("Fill with 0x%08X\n",dwColor));
    13151315      for(i=0,pColor = (DWORD*)pLine;i<(FillWidth/2);i++)
    13161316        pColor[i] = dwColor;
     
    13221322      break;
    13231323    case 3:
    1324       WriteLog("24 Bit\n");
     1324      dprintf(("24 Bit\n"));
    13251325
    13261326      dwColor = (dwFillColor<<8);
     
    13321332      break;
    13331333    case 4:
    1334       WriteLog("32 Bit\n");
     1334      dprintf(("32 Bit\n"));
    13351335      dwColor = dwFillColor;
    13361336      for(i=0,pColor = (DWORD*)pLine;i<FillWidth;i++)
     
    13391339    default:
    13401340      #ifdef DEBUG
    1341         WriteLog("Unexpected Bitdepth\n");
     1341        dprintf(("Unexpected Bitdepth\n"));
    13421342      #endif
    13431343      return DDERR_GENERIC;
     
    13671367    // Yeah! Color conversion needed ;)
    13681368    #ifdef DEBUG
    1369        WriteLog("Color converion ! Urks, may not work \n");
     1369       dprintf(("Color converion ! Urks, may not work \n"));
    13701370    #endif
    13711371
     
    13961396        {
    13971397          #ifdef DEBUG
    1398             WriteLog("Error creating Palette default to 0");
     1398            dprintf(("Error creating Palette default to 0"));
    13991399          #endif
    14001400          ulColor = 0;
     
    14961496      default:
    14971497        #ifdef DEBUG
    1498           WriteLog("Unexpected Bitdepth\n");
     1498          dprintf(("Unexpected Bitdepth\n"));
    14991499        #endif
    15001500        return DDERR_GENERIC;
     
    15231523                                ((DefaultPalette[i*3+1]>>2) <<5) +
    15241524                                ((DefaultPalette[i*3]>>3) << 11);
    1525         WriteLog( " # %d : RGB=%02X/%02X/%02X => %04X\n",
     1525        dprintf(( " # %d : RGB=%02X/%02X/%02X => %04X\n",
    15261526                  i,
    15271527                  DefaultPalette[i*3],
    15281528                  DefaultPalette[i*3+1],
    15291529                  DefaultPalette[i*3+2],
    1530                   wDefaultPalete16[i]);
     1530                  wDefaultPalete16[i]));
    15311531       // aPal24[i] = (lpColorTable[i].peBlue <<8) +
    15321532       //             (lpColorTable[i].peGreen<<16) +
     
    15691569  }
    15701570
    1571   WriteLog( "H: %d W: %d\n SRC @ %08X\n DST @ %08X\n",
    1572             CCheight, CCwidth, pSrc,pDst);
     1571  dprintf( ("H: %d W: %d\n SRC @ %08X\n DST @ %08X\n",
     1572            CCheight, CCwidth, pSrc,pDst));
    15731573
    15741574  pSLine = pSrc;
     
    15781578  {
    15791579    case 8:
    1580       WriteLog(" 8Bit target CC not implemented\n");
     1580      dprintf((" 8Bit target CC not implemented\n"));
    15811581      break;
    15821582    case 15:
    1583       WriteLog(" 15 Bit not implemented using 16bit might look ugly\n");
     1583      dprintf((" 15 Bit not implemented using 16bit might look ugly\n"));
    15841584    case 16:
    15851585      if(8==lpDraw->GetScreenBpp())
    15861586      {
    1587         WriteLog("8->16Bit CC\n");
     1587        dprintf(("8->16Bit CC\n"));
    15881588        for(y=0;CCheight;CCheight--,y++)
    15891589        {
     
    15991599      else
    16001600      {
    1601         WriteLog("%d ->16Bit Not implemented",lpDraw->GetScreenBpp());
     1601        dprintf(("%d ->16Bit Not implemented",lpDraw->GetScreenBpp()));
    16021602      }
    16031603      break;
     
    16051605      if(8==lpDraw->GetScreenBpp())
    16061606      {
    1607         WriteLog("8->24Bit CC");
     1607        dprintf(("8->24Bit CC"));
    16081608      }
    16091609      else
    16101610      {
    1611         WriteLog("%d ->24Bit Not implemented",lpDraw->GetScreenBpp());
     1611        dprintf(("%d ->24Bit Not implemented",lpDraw->GetScreenBpp()));
    16121612      }
    16131613      break;
     
    16151615      if(8==lpDraw->GetScreenBpp())
    16161616      {
    1617         WriteLog("8->32Bit CC");
     1617        dprintf(("8->32Bit CC"));
    16181618      }
    16191619      else
    16201620      {
    1621         WriteLog("%d ->32Bit Not implemented",lpDraw->GetScreenBpp());
     1621        dprintf(("%d ->32Bit Not implemented",lpDraw->GetScreenBpp()));
    16221622      }
    16231623      break;
    16241624    default:
    16251625      #ifdef DEBUG
    1626         WriteLog( "Unexpected Screen Bitdepth %d\n",
    1627                   lpDraw->dCaps.ulDepth);
     1626        dprintf( ("Unexpected Screen Bitdepth %d\n",
     1627                  lpDraw->dCaps.ulDepth));
    16281628      #endif
    16291629      break;
     
    16601660  sBlt.ulNumDstRects     = DIVE_FULLY_VISIBLE;
    16611661
    1662   WriteLog( "Colorconversion:\n FCC SRC %08X\n FCC DST %08X\n",
     1662  dprintf( ("Colorconversion:\n FCC SRC %08X\n FCC DST %08X\n",
    16631663            sBlt.fccSrcColorFormat,
    1664             sBlt.fccDstColorFormat );
     1664            sBlt.fccDstColorFormat ));
    16651665
    16661666  rc = DiveAllocImageBuffer( hDiveCC,
     
    16711671                             dwPitchFB,
    16721672                             (PBYTE)pFrameBuffer);
    1673   WriteLog("AllocDiveSrc Buffer rc= 0x%08X\n",rc);
     1673  dprintf("AllocDiveSrc Buffer rc= 0x%08X\n",rc);
    16741674
    16751675  rc = DiveAllocImageBuffer( hDiveCC,
     
    16801680                             dwPitchDB,
    16811681                             (PBYTE)pDiveBuffer);
    1682   WriteLog("AllocDiveDst Buffer rc= 0x%08X\n",rc);
     1682  dprintf(("AllocDiveDst Buffer rc= 0x%08X\n",rc));
    16831683
    16841684  rc = DiveSetupBlitter( hDiveCC,
    16851685                         &sBlt);
    1686   WriteLog("SetupBlitter rc= %X\n",rc);
     1686  dprintf(("SetupBlitter rc= %X\n",rc));
    16871687
    16881688  rc = DiveBlitImage( hDiveCC,
     
    16901690                      ulDN2);
    16911691
    1692   WriteLog("Blit rc= %X\n",rc);
     1692  dprintf(("Blit rc= %X\n",rc));
    16931693
    16941694  rc = DiveFreeImageBuffer( hDiveCC,
    16951695                            ulDN1);
    1696   WriteLog("Free Src rc= %X\n",rc);
     1696  dprintf(("Free Src rc= %X\n",rc));
    16971697
    16981698  rc = DiveFreeImageBuffer( hDiveCC,
    16991699                            ulDN2);
    17001700
    1701   WriteLog("Free dst rc= %X\n",rc);
     1701  dprintf(("Free dst rc= %X\n",rc));
    17021702*/
    17031703}
     
    18111811  {
    18121812
    1813     WriteLog("Remove Frontbuffer\n");
     1813    dprintf(("Remove Frontbuffer\n"));
    18141814
    18151815    // The real Frontbuffer was removed check if I'm now the one
    18161816    if(NULL!=BackBuffer)
    18171817    {
    1818       WriteLog("We have the a backbuffer so we're the Frontbuffer\n");
     1818      dprintf(("We have the a backbuffer so we're the Frontbuffer\n"));
    18191819      NextFlip = BackBuffer;
    18201820      DDSurfaceDesc.ddsCaps.dwCaps &= ~DDSCAPS_BACKBUFFER;
     
    18251825    {
    18261826      // Flipchain is destroyed
    1827       WriteLog("No longer part of a flipchain\n");
     1827      dprintf(("No longer part of a flipchain\n"));
    18281828      DDSurfaceDesc.ddsCaps.dwCaps &= ~(DDSCAPS_BACKBUFFER | DDSCAPS_FLIP);
    18291829    }
     
    18311831  else
    18321832  {
    1833     WriteLog("Set new Frontbuffer to 0x%08X\n",NewFBuffer);
     1833    dprintf(("Set new Frontbuffer to 0x%08X\n",NewFBuffer));
    18341834    if(NULL==NewFBuffer->GetFrontBuffer())
    18351835    {
    1836       WriteLog("We're the 1st backbuffer\n");
     1836      dprintf(("We're the 1st backbuffer\n"));
    18371837      DDSurfaceDesc.ddsCaps.dwCaps |=  DDSCAPS_BACKBUFFER | DDSCAPS_FLIP;
    18381838      FrontBuffer->NextFlip = this;
     
    18401840    else
    18411841    {
    1842       WriteLog("We are oe of many buffers\n");
     1842      dprintf(("We are oe of many buffers\n"));
    18431843      DDSurfaceDesc.ddsCaps.dwCaps &=  ~DDSCAPS_BACKBUFFER ;
    18441844      DDSurfaceDesc.ddsCaps.dwCaps |=  DDSCAPS_FLIP;
     
    18581858
    18591859  #ifdef DEBUG
    1860     WriteLog("OS2IDirectDrawSurface::SurfQueryInterface\n");
     1860    dprintf(("OS2IDirectDrawSurface::SurfQueryInterface\n"));
    18611861  #endif
    18621862
     
    18811881
    18821882  #ifdef DEBUG
    1883     WriteLog("OS2IDirectDrawSurface::SurfAddRef %d\n", me->Referenced+1);
     1883    dprintf(("OS2IDirectDrawSurface::SurfAddRef %d\n", me->Referenced+1));
    18841884  #endif
    18851885
     
    18931893
    18941894  #ifdef DEBUG
    1895     WriteLog("OS2IDirectDrawSurface::SurfRelease %d\n", me->Referenced-1);
    1896     WriteLog("OS2IDirectDrawSurface::Surface %X\n", me);
     1895    dprintf(("OS2IDirectDrawSurface::SurfRelease %d\n", me->Referenced-1));
     1896    dprintf(("OS2IDirectDrawSurface::Surface %X\n", me));
    18971897  #endif
    18981898  if(me->Referenced)
     
    19191919
    19201920  #ifdef DEBUG
    1921     WriteLog("SurfAddAttachedSurface\n");
     1921    dprintf(("SurfAddAttachedSurface\n"));
    19221922  #endif
    19231923  return SurfAddAttachedSurface4(This, (LPDIRECTDRAWSURFACE4)lpDDSurface);
     
    19331933
    19341934  #ifdef DEBUG
    1935     WriteLog("SurfAddAttachedSurface4\n");
     1935    dprintf(("SurfAddAttachedSurface4\n"));
    19361936  #endif
    19371937
     
    19441944  {
    19451945    #ifdef DEBUG
    1946      WriteLog("Internal : Can't attach an implicit created surface to an other surface\n");
     1946     dprintf(("Internal : Can't attach an implicit created surface to an other surface\n"));
    19471947    #endif
    19481948    return(DDERR_CANNOTATTACHSURFACE);
     
    19521952  {
    19531953    #ifdef DEBUG
    1954      WriteLog("Can't attach an surface to itself\n");
     1954     dprintf(("Can't attach an surface to itself\n"));
    19551955    #endif
    19561956    return(DDERR_CANNOTATTACHSURFACE);
     
    19771977        {
    19781978          #ifdef DEBUG
    1979             WriteLog("Internal : Error attaching to MipMap\n");
     1979            dprintf(("Internal : Error attaching to MipMap\n"));
    19801980          #endif
    19811981          return(DDERR_CANNOTATTACHSURFACE);
     
    19851985      {
    19861986        #ifdef DEBUG
    1987           WriteLog("Target Surface isn't a MipMap\n");
     1987          dprintf(("Target Surface isn't a MipMap\n"));
    19881988        #endif
    19891989        return(DDERR_CANNOTATTACHSURFACE);
     
    20032003      {
    20042004        #ifdef DEBUG
    2005           WriteLog("Internal : Error attaching to general Set\n");
     2005          dprintf(("Internal : Error attaching to general Set\n"));
    20062006        #endif
    20072007        return(DDERR_CANNOTATTACHSURFACE);
     
    20182018    {
    20192019      #ifdef DEBUG
    2020         WriteLog("Surfaces don't have same dimensions\n");
     2020        dprintf(("Surfaces don't have same dimensions\n"));
    20212021      #endif
    20222022      return(DDERR_CANNOTATTACHSURFACE);
     
    20292029        {
    20302030          #ifdef DEBUG
    2031             WriteLog("Surfaces already has a front/backbuffer\n");
     2031            dprintf(("Surfaces already has a front/backbuffer\n"));
    20322032          #endif
    20332033          return(DDERR_SURFACEALREADYATTACHED);
     
    20642064        {
    20652065          #ifdef DEBUG
    2066             WriteLog("Can't attach backbuffer to anything but a frontbuffer\n");
     2066            dprintf(("Can't attach backbuffer to anything but a frontbuffer\n"));
    20672067          #endif
    20682068         return(DDERR_CANNOTATTACHSURFACE);
     
    20882088            {
    20892089              #ifdef DEBUG
    2090                 WriteLog("Internal : Error attaching to MipMap\n");
     2090                dprintf(("Internal : Error attaching to MipMap\n"));
    20912091              #endif
    20922092              return(DDERR_CANNOTATTACHSURFACE);
     
    20962096          {
    20972097            #ifdef DEBUG
    2098               WriteLog("Tagget Surface isn't a MipMap\n");
     2098              dprintf(("Tagget Surface isn't a MipMap\n"));
    20992099            #endif
    21002100           return(DDERR_CANNOTATTACHSURFACE);
     
    21122112          {
    21132113            #ifdef DEBUG
    2114               WriteLog("Internal : Error attaching to general Set\n");
     2114              dprintf(("Internal : Error attaching to general Set\n"));
    21152115            #endif
    21162116            return(DDERR_CANNOTATTACHSURFACE);
     
    21202120    }
    21212121  }
    2122   WriteLog("Surface attached\n");
     2122  dprintf(("Surface attached\n"));
    21232123  return(DD_OK);
    21242124}
     
    21282128{
    21292129  #ifdef DEBUG
    2130     WriteLog("SurfAddOverlayDirtyRect Not implemented by M$ in V 6.0! \n");
     2130    dprintf(("SurfAddOverlayDirtyRect Not implemented by M$ in V 6.0! \n"));
    21312131  #endif
    21322132
     
    21812181  #ifdef DEBUG
    21822182    if ( (NULL!=lpDestRect)&& (NULL!=lpSrcRect))
    2183       WriteLog("SurfBlt4 to (%d,%d)(%d,%d) at %08X from (%d,%d)(%d,%d) at %08X\n", lpDestRect->left, lpDestRect->top,
     2183      dprintf(("SurfBlt4 to (%d,%d)(%d,%d) at %08X from (%d,%d)(%d,%d) at %08X\n", lpDestRect->left, lpDestRect->top,
    21842184               lpDestRect->right, lpDestRect->bottom, dest, lpSrcRect->left, lpSrcRect->top,
    2185                lpSrcRect->right, lpSrcRect->bottom, src);
     2185               lpSrcRect->right, lpSrcRect->bottom, src));
    21862186
    21872187    _dump_DDBLT(dwFlags);
     
    22342234      delete pIRectDest;
    22352235      #ifdef DEBUG
    2236         WriteLog("Blt: Dest Surface partly locked\n");
     2236        dprintf(("Blt: Dest Surface partly locked\n"));
    22372237      #endif
    22382238      return(DDERR_SURFACEBUSY);
     
    22492249  if(dwFlags & DDBLT_COLORFILL)
    22502250  {
    2251     WriteLog("ColorFill\n");
     2251    dprintf(("ColorFill\n"));
    22522252    if((NULL==lpDDBltFx)||(lpDDBltFx->dwSize!=sizeof(DDBLTFX)) )
    22532253      return DDERR_INVALIDPARAMS;
     
    22632263  if (dwFlags & DDBLT_DEPTHFILL)
    22642264  {
    2265     WriteLog("DepthFill\n");
     2265    dprintf(("DepthFill\n"));
    22662266  #ifdef USE_OPENGL
    22672267    GLboolean ztest;
    22682268    // Todo support more than one Z-Buffer
    22692269    // Clears the screen
    2270     WriteLog("Filling depth buffer with %ld\n", lpbltfx->b.dwFillDepth);
     2270    dprintf(("Filling depth buffer with %ld\n", lpbltfx->b.dwFillDepth));
    22712271    glClearDepth(lpDDBltFx->b.dwFillDepth / 65535.0); // We suppose a 16 bit Z Buffer
    22722272    glGetBooleanv(GL_DEPTH_TEST, &ztest);
     
    23212321  {
    23222322    #ifdef DEBUG
    2323       WriteLog("Unsupported sourceless FX operation. Flags = 0x%04X\n",dwFlags);
     2323      dprintf(("Unsupported sourceless FX operation. Flags = 0x%04X\n",dwFlags));
    23242324    #endif
    23252325    return DD_OK;
     
    23722372      delete pIRectSrc;
    23732373      #ifdef DEBUG
    2374         WriteLog("Blt: Src Surface partly locked\n");
     2374        dprintf(("Blt: Src Surface partly locked\n"));
    23752375      #endif
    23762376      return(DDERR_SURFACEBUSY);
     
    23822382  {
    23832383    #ifdef DEBUG
    2384       WriteLog("Blitting with scaleing\n Not supported.\n");
     2384      dprintf(("Blitting with scaleing\n Not supported.\n"));
    23852385    #endif
    23862386    return DDERR_NOSTRETCHHW;
     
    23922392  {
    23932393    // Stretching not supported
    2394     WriteLog("No stretched blits\n");
     2394    dprintf(("No stretched blits\n"));
    23952395
    23962396    return DDERR_NOSTRETCHHW;
     
    23992399  if (dest->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
    24002400  {
    2401     WriteLog("Dest is Primary Surface\n");
     2401    dprintf(("Dest is Primary Surface\n"));
    24022402    if(src->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
    24032403    {
    24042404      // special Type 1 : Bliting between parts of the screen
    24052405
    2406       WriteLog("Src is Primary Surface\n");
     2406      dprintf(("Src is Primary Surface\n"));
    24072407
    24082408      if( *pIRectDest == *pIRectSrc)
     
    24742474        if( (dwFlags &DDBLT_KEYSRC) || (dwFlags & DDBLT_KEYSRCOVERRIDE) )
    24752475        {
    2476           WriteLog("Transparent src blit not done yet for primary!!");
     2476          dprintf(("Transparent src blit not done yet for primary!!"));
    24772477        }
    24782478        else
    24792479        {
    2480           WriteLog("Unhandled Flags Destination colorkey ? 0x%04X",dwFlags);
     2480          dprintf(("Unhandled Flags Destination colorkey ? 0x%04X",dwFlags));
    24812481        }
    24822482      }
     
    25332533        else
    25342534        {
    2535           WriteLog("Transblt not done yet");
     2535          dprintf(("Transblt not done yet"));
    25362536          if(dwFlags & DDBLT_KEYSRC)
    25372537          {
     
    29962996{
    29972997  #ifdef DEBUG
    2998     WriteLog("SurfBltBatch Not implemented by M$\n");
     2998    dprintf(("SurfBltBatch Not implemented by M$\n"));
    29992999  #endif
    30003000
     
    30063006{
    30073007  #ifdef DEBUG
    3008     WriteLog("SurfBltFast NIY\n");
     3008    dprintf(("SurfBltFast NIY\n"));
    30093009  #endif
    30103010
     
    30273027
    30283028  #ifdef DEBUG
    3029     WriteLog("SurfBltFast4 %08X at(%d/%d) onto %08X with flags %08X\n",src, dwX,dwY, dest, dwTrans);
     3029    dprintf(("SurfBltFast4 %08X at(%d/%d) onto %08X with flags %08X\n",src, dwX,dwY, dest, dwTrans));
    30303030  #endif
    30313031
     
    30353035      (dwY>dest->height))
    30363036  {
    3037     WriteLog("Invalid Parameters %08X, %d %d", lpDDSrcSurface ,dest->width , dest->height);
     3037    dprintf(("Invalid Parameters %08X, %d %d", lpDDSrcSurface ,dest->width , dest->height));
    30383038    return DDERR_INVALIDPARAMS;
    30393039  }
     
    30673067  if(DDBLTFAST_NOCOLORKEY == dwTrans )
    30683068  {
    3069     WriteLog("Solid Blit");
     3069    dprintf(("Solid Blit"));
    30703070    #ifdef USE_ASM
    30713071      BltRec(pBltPos, pSrcPos, BlitWidth, BlitHeight,
     
    30873087  else
    30883088  {
    3089     WriteLog("TransBlit\n");
     3089    dprintf(("TransBlit\n"));
    30903090
    30913091    if(dwTrans & DDBLTFAST_SRCCOLORKEY)
    30923092    {
    3093       WriteLog("Trans SRC\n");
     3093      dprintf(("Trans SRC\n"));
    30943094      // transparent source
    30953095      dwSrcColor = src->DDSurfaceDesc.ddckCKSrcBlt.dwColorSpaceLowValue;
    30963096      if(dwTrans & DDBLTFAST_DESTCOLORKEY)
    30973097      {
    3098         WriteLog("And Dest Colorkey");
     3098        dprintf(("And Dest Colorkey"));
    30993099        dwDestColor = dest->DDSurfaceDesc.ddckCKDestBlt.dwColorSpaceLowValue;
    31003100        // Source and dest colorkeying
     
    31933193        // This MMX detection should be moved into OS2Draw
    31943194        // and into the surface constructor a setup for blitting pointers
    3195         WriteLog("Only Src ColorKey");
     3195        dprintf(("Only Src ColorKey"));
    31963196        switch(dest->dwBytesPPDive)
    31973197        {
     
    32643264      if(dwTrans & DDBLTFAST_DESTCOLORKEY)
    32653265      {
    3266         WriteLog("DestColorKey\n");
     3266        dprintf(("DestColorKey\n"));
    32673267
    32683268        dwDestColor = dest->DDSurfaceDesc.ddckCKDestBlt.dwColorSpaceLowValue;
     
    33443344      else
    33453345      {
    3346         WriteLog("Unexpected Flags");
     3346        dprintf(("Unexpected Flags"));
    33473347      }
    33483348    }
     
    33593359  OS2IDirectDrawSurface *me = (OS2IDirectDrawSurface *)This;
    33603360  #ifdef DEBUG
    3361     WriteLog("SurfDeleteAttachedSurface\n");
     3361    dprintf(("SurfDeleteAttachedSurface\n"));
    33623362  #endif
    33633363
     
    33763376  BOOL Found = FALSE;
    33773377  #ifdef DEBUG
    3378     WriteLog("SurfDeleteAttachedSurface\n");
     3378    dprintf(("SurfDeleteAttachedSurface\n"));
    33793379  #endif
    33803380
     
    35183518  OS2IDirectDrawSurface *me = (OS2IDirectDrawSurface *)This;
    35193519  #ifdef DEBUG
    3520     WriteLog("SurfEnumAttachedSurfaces\n");
     3520    dprintf(("SurfEnumAttachedSurfaces\n"));
    35213521  #endif
    35223522
     
    35343534
    35353535  #ifdef DEBUG
    3536     WriteLog("SurfEnumAttachedSurfaces\n");
     3536    dprintf(("SurfEnumAttachedSurfaces\n"));
    35373537  #endif
    35383538  if (NULL==lpCallBack)
     
    35883588{
    35893589  #ifdef DEBUG
    3590     WriteLog("SurfEnumOverlayZOrders\n");
     3590    dprintf(("SurfEnumOverlayZOrders\n"));
    35913591  #endif
    35923592
     
    35983598{
    35993599  #ifdef DEBUG
    3600     WriteLog("SurfEnumOverlayZOrders\n");
     3600    dprintf(("SurfEnumOverlayZOrders\n"));
    36013601  #endif
    36023602
     
    36093609  OS2IDirectDrawSurface *me = (OS2IDirectDrawSurface *)This;
    36103610  #ifdef DEBUG
    3611     WriteLog("SurfFlip\n");
     3611    dprintf(("SurfFlip\n"));
    36123612  #endif
    36133613
     
    36263626
    36273627  #ifdef DEBUG
    3628     WriteLog("SurfFlip4\n");
     3628    dprintf(("SurfFlip4\n"));
    36293629  #endif
    36303630  if(!((me->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER) &&
     
    36333633  {
    36343634    #ifdef DEBUG
    3635       WriteLog("Flip called on none Frontbuffer/Flip surface\n Flags:\n");
     3635      dprintf(("Flip called on none Frontbuffer/Flip surface\n Flags:\n"));
    36363636      _dump_DDSCAPS(me->DDSurfaceDesc.ddsCaps.dwCaps);
    3637       WriteLog("\n");
     3637      dprintf(("\n"));
    36383638    #endif
    36393639    return(DDERR_NOTFLIPPABLE);
     
    36433643  {
    36443644    #ifdef DEBUG
    3645       WriteLog("Check if Surface is in Flipchain!\n");
     3645      dprintf(("Check if Surface is in Flipchain!\n"));
    36463646    #endif
    36473647
     
    36573657    {
    36583658      #ifdef DEBUG
    3659         WriteLog("Surface not in Flipchain!\n");
     3659        dprintf(("Surface not in Flipchain!\n"));
    36603660      #endif
    36613661      return (DDERR_INVALIDPARAMS); // Not sure if the returnvalue is right
     
    36663666    FlipSurface = me->NextFlip; // Take the next Surface in the Flipchain
    36673667    #ifdef DEBUG
    3668       WriteLog("Next Surface @ 0x%08X\n",FlipSurface);
     3668      dprintf(("Next Surface @ 0x%08X\n",FlipSurface));
    36693669    #endif
    36703670  }
     
    36733673  {
    36743674    #ifdef DEBUG
    3675       WriteLog("Locked surface(s) Dest %d Src %d\n",me->fLocked,FlipSurface->fLocked);
     3675      dprintf(("Locked surface(s) Dest %d Src %d\n",me->fLocked,FlipSurface->fLocked));
    36763676    #endif
    36773677    return(DDERR_SURFACEBUSY);
     
    36813681  {
    36823682    #ifdef DEBUG
    3683       WriteLog("DIVE Flipchain");
     3683      dprintf(("DIVE Flipchain"));
    36843684    #endif
    36853685
     
    36923692
    36933693    #ifdef DEBUG
    3694       WriteLog("DiveBlitImage rc = 0x%08X\n");
     3694      dprintf(("DiveBlitImage rc = 0x%08X\n"));
    36953695    #endif
    36963696
     
    37043704  {
    37053705    #ifdef DEBUG
    3706       WriteLog("Memory Flipchain");
     3706      dprintf(("Memory Flipchain"));
    37073707    #endif
    37083708    // Memory Flipchain
     
    37573757  OS2IDirectDrawSurface *me = (OS2IDirectDrawSurface *)This;
    37583758  #ifdef DEBUG
    3759     WriteLog("SurfGetAttachedSurface\n");
     3759    dprintf(("SurfGetAttachedSurface\n"));
    37603760  #endif
    37613761
     
    37743774
    37753775  #ifdef DEBUG
    3776     WriteLog("SurfGetAttachedSurface4\n>Requested Caps: ");
     3776    dprintf(("SurfGetAttachedSurface4\n>Requested Caps: "));
    37773777    _dump_DDSCAPS(lpDDCaps->dwCaps);
    3778     WriteLog("\n");
     3778    dprintf(("\n"));
    37793779  #endif
    37803780
    37813781  if( (NULL==lpDDCaps)||(NULL==lpDDSurf))
    37823782  {
    3783     WriteLog("Invalid params\n\n");
     3783    dprintf(("Invalid params\n\n"));
    37843784    return (DDERR_INVALIDPARAMS);
    37853785  }
     
    37913791      (me->BackBuffer->DDSurfaceDesc.ddsCaps.dwCaps & lpDDCaps->dwCaps) )
    37923792  {
    3793     WriteLog("Return Backbuffer\n");
     3793    dprintf(("Return Backbuffer\n"));
    37943794    AttachedSurface = me->BackBuffer;
    37953795  }
     
    38543854{
    38553855  #ifdef DEBUG
    3856     WriteLog("SurfGetBltStatus\n");
     3856    dprintf(("SurfGetBltStatus\n"));
    38573857  #endif
    38583858
     
    38663866
    38673867  #ifdef DEBUG
    3868     WriteLog("SurfGetCaps\n");
     3868    dprintf(("SurfGetCaps\n"));
    38693869  #endif
    38703870
     
    38843884  OS2IDirectDrawSurface *me = (OS2IDirectDrawSurface *)This;
    38853885  #ifdef DEBUG
    3886     WriteLog("SurfGetCaps4\n");
     3886    dprintf(("SurfGetCaps4\n"));
    38873887  #endif
    38883888
     
    39063906
    39073907  #ifdef DEBUG
    3908     WriteLog("SurfGetClipper\n");
     3908    dprintf(("SurfGetClipper\n"));
    39093909  #endif
    39103910
     
    39243924
    39253925#ifdef DEBUG
    3926   WriteLog("SurfGetColorKey\n");
     3926  dprintf(("SurfGetColorKey\n"));
    39273927#endif
    39283928
     
    39633963
    39643964  #ifdef DEBUG
    3965     WriteLog("SurfGetDC\n");
     3965    dprintf(("SurfGetDC\n"));
    39663966  #endif
    39673967
     
    39853985    {
    39863986      #ifdef DEBUG
    3987         WriteLog("Can't create compatible DC!\n");
     3987        dprintf(("Can't create compatible DC!\n"));
    39883988      #endif
    39893989      me->Vtbl.Unlock(me,NULL);
     
    39953995      (me->hbmImage == NULL) )
    39963996  {
    3997     WriteLog( "Trying to create Bitmap (%d/%d) at %d Bit\n",
     3997    dprintf( ("Trying to create Bitmap (%d/%d) at %d Bit\n",
    39983998              LockedSurfaceDesc.lPitch/ (LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount>>3),
    39993999              LockedSurfaceDesc.dwHeight,
    40004000              LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount
    4001             );
     4001            ));
    40024002    #if 0
    40034003    memset(&BitmapInfo, 0, sizeof(BitmapInfo));
     
    40194019      case 1:
    40204020      case 4:
    4021         WriteLog("1/4 Bit Not yet supported\n");
     4021        dprintf(("1/4 Bit Not yet supported\n"));
    40224022        break;
    40234023      case 8:
     
    40384038      case 16:
    40394039      case 32:
    4040         WriteLog("16/32 Bit not supported by OS/2");
     4040        dprintf(("16/32 Bit not supported by OS/2"));
    40414041        break;
    40424042      case 24:
     
    40564056      default:
    40574057        #ifdef DEBUG
    4058           WriteLog( "Unexptected BitCount %d \n",
    4059                     LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount);
     4058          dprintf( ("Unexptected BitCount %d \n",
     4059                    LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount));
    40604060        #endif
    40614061        me->hbmImage=NULL;
     
    40654065    {
    40664066      #ifdef DEBUG
    4067         WriteLog("Can't create bitmap!\n");
     4067        dprintf(("Can't create bitmap!\n"));
    40684068      #endif
    40694069      DeleteDC(me->hdcImage);
     
    40794079    {
    40804080      #ifdef DEBUG
    4081         WriteLog("The Surface was locked/unlocked after the last DC was created =>Update Bitmap!\n");
     4081        dprintf(("The Surface was locked/unlocked after the last DC was created =>Update Bitmap!\n"));
    40824082      #endif
    40834083
     
    41164116        default:
    41174117          #ifdef DEBUG
    4118             WriteLog("Unexptected BitCount %d => Bitmap not updated!\n",LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount);
     4118            dprintf(("Unexptected BitCount %d => Bitmap not updated!\n",LockedSurfaceDesc.ddpfPixelFormat.dwRGBBitCount));
    41194119          #endif
    41204120          break;
     
    41314131    {
    41324132      #ifdef DEBUG
    4133         WriteLog("Can't select bitmap into dc!\n");
     4133        dprintf(("Can't select bitmap into dc!\n"));
    41344134      #endif
    41354135      DeleteDC(me->hdcImage);
     
    41534153{
    41544154  #ifdef DEBUG
    4155     WriteLog("SurfGetFlipStatus\n");
     4155    dprintf(("SurfGetFlipStatus\n"));
    41564156  #endif
    41574157
     
    41674167  OS2IDirectDrawSurface *me = (OS2IDirectDrawSurface *)This;
    41684168  #ifdef DEBUG
    4169     WriteLog("SurfGetOverlayPosition\n");
     4169    dprintf(("SurfGetOverlayPosition\n"));
    41704170  #endif
    41714171
     
    41964196
    41974197  #ifdef DEBUG
    4198     WriteLog("SurfGetPalette\n");
     4198    dprintf(("SurfGetPalette\n"));
    41994199  #endif
    42004200
     
    42144214
    42154215  #ifdef DEBUG
    4216     WriteLog("SurfGetPixelFormat\n");
     4216    dprintf(("SurfGetPixelFormat\n"));
    42174217  #endif
    42184218
     
    42334233
    42344234  #ifdef DEBUG
    4235     WriteLog("SurfGetSurfaceDesc\n");
     4235    dprintf(("SurfGetSurfaceDesc\n"));
    42364236  #endif
    42374237
     
    42524252
    42534253  #ifdef DEBUG
    4254     WriteLog("SurfGetSurfaceDesc4\n");
     4254    dprintf(("SurfGetSurfaceDesc4\n"));
    42554255  #endif
    42564256
     
    42694269{
    42704270  #ifdef DEBUG
    4271     WriteLog("SurfInitialize\n");
     4271    dprintf(("SurfInitialize\n"));
    42724272  #endif
    42734273
     
    42794279{
    42804280  #ifdef DEBUG
    4281     WriteLog("SurfInitialize\n");
     4281    dprintf(("SurfInitialize\n"));
    42824282  #endif
    42834283
     
    42934293  //
    42944294  #ifdef DEBUG
    4295     WriteLog("SurfIsLost\n");
     4295    dprintf(("SurfIsLost\n"));
    42964296  #endif
    42974297
     
    43104310
    43114311  #ifdef DEBUG
    4312     WriteLog("SurfLock %d %08X %d %d\n", (int)lpRect, (int)lpSurfaceDesc, dwFlags, hEvent);
     4312    dprintf(("SurfLock %d %08X %d %d\n", (int)lpRect, (int)lpSurfaceDesc, dwFlags, hEvent));
    43134313  #endif
    43144314
     
    43554355
    43564356  #ifdef DEBUG
    4357     WriteLog("SurfLock4 %08X %08X %d %d\n", (int)lpRect, (int)lpSurfaceDesc, dwFlags, hEvent);
     4357    dprintf(("SurfLock4 %08X %08X %d %d\n", (int)lpRect, (int)lpSurfaceDesc, dwFlags, hEvent));
    43584358  #endif
    43594359
     
    43704370
    43714371  // ToDo : the lockchecking should be done in a critcal seq.
    4372   WriteLog( "Lock Rectangle (%d/%d) x (%d/%d)\n",
     4372  dprintf( ("Lock Rectangle (%d/%d) x (%d/%d)\n",
    43734373            pIRectNew->Top(),
    43744374            pIRectNew->Left(),
    43754375            pIRectNew->Bottom(),
    4376             pIRectNew->Right() );
     4376            pIRectNew->Right() ));
    43774377
    43784378  rc = DD_OK;
     
    43834383    {
    43844384      // If anything is locked we can't locke the complete surface
    4385       WriteLog("Surface has locked Rectangles, and we want to complete lock it\n");
     4385      dprintf(("Surface has locked Rectangles, and we want to complete lock it\n"));
    43864386      Found = TRUE;
    43874387    }
     
    43914391      // be locked so check for this
    43924392
    4393       WriteLog("Surface has locked Rectangles, check if the overlap\n");
     4393      dprintf(("Surface has locked Rectangles, check if the overlap\n"));
    43944394
    43954395      i=0;
     
    43994399      {
    44004400        pIRectCurrent = (DDRectangle*) DPA_FastGetPtr(me->DPA_LockedRects,i);
    4401         WriteLog( "Test with Rectangle (%d/%d) x (%d/%d)\n",
     4401        dprintf( ("Test with Rectangle (%d/%d) x (%d/%d)\n",
    44024402                  pIRectCurrent->Top(),
    44034403                  pIRectCurrent->Left(),
    44044404                  pIRectCurrent->Bottom(),
    4405                   pIRectCurrent->Right() );
     4405                  pIRectCurrent->Right() ));
    44064406        Found = pIRectCurrent->intersects(*pIRectNew);
    44074407        i++;
     
    44144414      delete pIRectNew;
    44154415      #ifdef DEBUG
    4416         WriteLog("SurfLock4: Surface already locked\n\n");
     4416        dprintf(("SurfLock4: Surface already locked\n\n"));
    44174417      #endif
    44184418      rc = DDERR_SURFACEBUSY;
     
    44314431                                  (lpRect->left * (lpSurfaceDesc->ddpfPixelFormat.dwRGBBitCount>>3)));
    44324432      #ifdef DEBUG
    4433         WriteLog("SurfLock4 %08X (x,y) = (%d,%d)\n\n", lpSurfaceDesc->lpSurface, lpRect->top, lpRect->left);
     4433        dprintf(("SurfLock4 %08X (x,y) = (%d,%d)\n\n", lpSurfaceDesc->lpSurface, lpRect->top, lpRect->left));
    44344434      #endif
    44354435    }
     
    44374437    {
    44384438      #ifdef DEBUG
    4439         WriteLog("SurfLock4 %08X \n\n", lpSurfaceDesc->lpSurface);
     4439        dprintf(("SurfLock4 %08X \n\n", lpSurfaceDesc->lpSurface));
    44404440      #endif
    44414441    }
     
    44694469
    44704470  #ifdef DEBUG
    4471     WriteLog("SurfReleaseDC\n");
     4471    dprintf(("SurfReleaseDC\n"));
    44724472  #endif
    44734473
     
    45004500                      (PBITMAPINFO)&BitmapInfo,
    45014501                      DIB_RGB_COLORS);
    4502       WriteLog( "GetDIBits rc=%d\n Size   :%d\n Width  :%d\n Height :%d\n"
     4502      dprintf( ("GetDIBits rc=%d\n Size   :%d\n Width  :%d\n Height :%d\n"
    45034503                " Planes :%d\n BitCount :%d\nLastEror = %d\nPixel[0,0] = 0x%02X\n",
    45044504                rc,
     
    45094509                BitmapInfo.bmiHead.biBitCount,
    45104510                GetLastError(),
    4511                 ((char*)me->DDSurfaceDesc.lpSurface)[0]);
     4511                ((char*)me->DDSurfaceDesc.lpSurface)[0]));
    45124512      rc = GetDIBits( hdc,
    45134513                      me->hbmImage,
     
    45174517                      (PBITMAPINFO)&BitmapInfo,
    45184518                      DIB_RGB_COLORS);
    4519       WriteLog( "GetDIBits rc=%d\n LastEror = %d\nPixel[0,0] = 0x%02X\n",
     4519      dprintf( ("GetDIBits rc=%d\n LastEror = %d\nPixel[0,0] = 0x%02X\n",
    45204520                rc,
    45214521                GetLastError(),
    4522                 ((char*)me->DDSurfaceDesc.lpSurface)[0]);
     4522                ((char*)me->DDSurfaceDesc.lpSurface)[0]));
    45234523      break;
    45244524    case 16:
     
    45394539    default:
    45404540      #ifdef DEBUG
    4541         WriteLog("Unexptected BitCount %d => Surface unlocked but no data copied back\n",me->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount);
     4541        dprintf(("Unexptected BitCount %d => Surface unlocked but no data copied back\n",me->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount));
    45424542      #endif
    45434543      // we might could keep the surface locked and return an error but this is more "safe"
     
    45494549                  sizeof(BITMAP),
    45504550                  &bmpData);
    4551   WriteLog( "GetObject returned rc=%d\n BitmapInfo:\n Size:(%dx%d)\n Pitch: %d\n Bits %d\n @mem %08X",
     4551  dprintf( ("GetObject returned rc=%d\n BitmapInfo:\n Size:(%dx%d)\n Pitch: %d\n Bits %d\n @mem %08X",
    45524552            rc,
    45534553            bmpData.bmWidth, bmpData.bmHeight,
    45544554            bmpData.bmWidthBytes,
    45554555            bmpData.bmBitsPixel,
    4556             bmpData.bmBits);
     4556            bmpData.bmBits));
    45574557  #endif
    45584558  me->Vtbl.Unlock(me,NULL);
     
    45664566{
    45674567  #ifdef DEBUG
    4568     WriteLog("SurfRestore\n");
     4568    dprintf(("SurfRestore\n"));
    45694569  #endif
    45704570
     
    45784578
    45794579  #ifdef DEBUG
    4580     WriteLog("SurfSetClipper\n");
     4580    dprintf(("SurfSetClipper\n"));
    45814581  #endif
    45824582
     
    46154615  HRESULT rc;
    46164616  #ifdef DEBUG
    4617     WriteLog("SurfSetColorKey\n");
     4617    dprintf(("SurfSetColorKey\n"));
    46184618  #endif
    46194619
     
    46544654
    46554655  #ifdef DEBUG
    4656     WriteLog("SurfSetOverlayPosition\n");
     4656    dprintf(("SurfSetOverlayPosition\n"));
    46574657  #endif
    46584658
     
    46834683
    46844684  #ifdef DEBUG
    4685     WriteLog("SurfSetPalette\n");
     4685    dprintf(("SurfSetPalette\n"));
    46864686  #endif
    46874687
     
    47464746
    47474747  #ifdef DEBUG
    4748     WriteLog("SurfUnlock at %08X\n",lpSurfaceData);
     4748    dprintf(("SurfUnlock at %08X\n",lpSurfaceData));
    47494749  #endif
    47504750
     
    47524752  {
    47534753    #ifdef DEBUG
    4754       WriteLog("Surface not locked!\n");
     4754      dprintf(("Surface not locked!\n"));
    47554755    #endif
    47564756    return(DDERR_NOTLOCKED);
     
    47584758
    47594759  #ifdef DEBUG
    4760     WriteLog("Start Emuneration of Locked Rects\n");
     4760    dprintf(("Start Emuneration of Locked Rects\n"));
    47614761  #endif
    47624762
     
    47644764  if(NULL!=lpSurfaceData)
    47654765  {
    4766     WriteLog("Buffer Pointer Compare");
     4766    dprintf(("Buffer Pointer Compare"));
    47674767
    47684768    // We got a pinter to the surface memory so we must search for
     
    47724772    {
    47734773      pIRectEnum = (DDRectangle*)DPA_FastGetPtr(me->DPA_LockedRects,i);
    4774       WriteLog( "Test with Rectangle %d (%d/%d) x (%d/%d) Mem at %08X\n",
     4774      dprintf(( "Test with Rectangle %d (%d/%d) x (%d/%d) Mem at %08X\n",
    47754775                i,
    47764776                pIRectEnum->Top(),
     
    47784778                pIRectEnum->Bottom(),
    47794779                pIRectEnum->Right(),
    4780                 pIRectEnum->GetMemPtr() );
     4780                pIRectEnum->GetMemPtr() ));
    47814781
    47824782      Found = ( pIRectEnum->GetMemPtr() == lpSurfaceData);
     
    47844784      {
    47854785        #ifdef DEBUG
    4786           WriteLog("Not Found, try Next rect\n");
     4786          dprintf(("Not Found, try Next rect\n"));
    47874787        #endif
    47884788        i++;
     
    47914791      else
    47924792      {
    4793         WriteLog("Found Rect\n");
     4793        dprintf(("Found Rect\n"));
    47944794      }
    47954795      #endif
     
    48004800    // If a NULL pointer was passed in the SW tries to unlock the
    48014801    // complete surface so we must compare the rects.
    4802     WriteLog("Rectangle compare");
     4802    dprintf(("Rectangle compare"));
    48034803
    48044804    pIRectUnlock = new DDRectangle( 0, 0, me->height, me->width);
     
    48074807    {
    48084808      pIRectEnum = (DDRectangle*)DPA_FastGetPtr(me->DPA_LockedRects,i);
    4809       WriteLog( "Test with Rectangle %d (%d/%d) x (%d/%d) Mem at %08X\n",
     4809      dprintf(( "Test with Rectangle %d (%d/%d) x (%d/%d) Mem at %08X\n",
    48104810                i,
    48114811                pIRectEnum->Top(),
     
    48134813                pIRectEnum->Bottom(),
    48144814                pIRectEnum->Right(),
    4815                 pIRectEnum->GetMemPtr() );
     4815                pIRectEnum->GetMemPtr() ));
    48164816
    48174817      Found = (*pIRectEnum == *pIRectUnlock);
     
    48194819      {
    48204820        #ifdef DEBUG
    4821           WriteLog("Not Found, try Next rect\n");
     4821          dprintf(("Not Found, try Next rect\n"));
    48224822        #endif
    48234823        i++;
     
    48264826      else
    48274827      {
    4828         WriteLog("Found Rect\n");
     4828        dprintf(("Found Rect\n"));
    48294829      }
    48304830      #endif
     
    48364836  {
    48374837    #ifdef DEBUG
    4838       WriteLog("Rectangle not locked, wrong Rect!\n\n");
     4838      dprintf(("Rectangle not locked, wrong Rect!\n\n"));
    48394839    #endif
    48404840    rc = DDERR_INVALIDRECT;
     
    48434843  {
    48444844    #ifdef DEBUG
    4845       WriteLog("Remove Rect %d from Seq.\n",i);
     4845      dprintf(("Remove Rect %d from Seq.\n",i));
    48464846    #endif
    48474847
     
    48494849
    48504850    #ifdef DEBUG
    4851       WriteLog("Test if locked Rects main\n");
     4851      dprintf(("Test if locked Rects main\n"));
    48524852    #endif
    48534853
     
    48554855    {
    48564856      #ifdef DEBUG
    4857         WriteLog("No Locked Rects left for surface\n");
     4857        dprintf(("No Locked Rects left for surface\n"));
    48584858      #endif
    48594859      me->fLocked = FALSE;
     
    48614861    #ifdef DEBUG
    48624862    else
    4863       WriteLog( "%d Rects in Seq\n",
    4864                 DPA_GetPtrCount(me->DPA_LockedRects));
     4863      dprintf(( "%d Rects in Seq\n",
     4864                DPA_GetPtrCount(me->DPA_LockedRects)));
    48654865    #endif
    48664866
     
    48684868    {
    48694869      #ifdef DEBUG
    4870         WriteLog( "ColorConversion Needed %08X != %08X\n",
     4870        dprintf(( "ColorConversion Needed %08X != %08X\n",
    48714871                  me->pFrameBuffer,
    4872                   me->pDiveBuffer);
     4872                  me->pDiveBuffer));
    48734873      #endif
    48744874      if(NULL!=lpSurfaceData)
     
    48884888    #ifdef DEBUG
    48894889    else
    4890       WriteLog( "No ColorConversion Needed");
     4890      dprintf( ("No ColorConversion Needed"));
    48914891    #endif
    48924892
     
    48964896    me->lpVtbl->ChangeUniquenessValue(me);
    48974897
    4898     WriteLog("Unlock OK\n\n");
     4898    dprintf(("Unlock OK\n\n"));
    48994899
    49004900    rc = DD_OK;
     
    49224922
    49234923  #ifdef DEBUG
    4924     WriteLog("SurfUnlock4\n");
     4924    dprintf(("SurfUnlock4\n"));
    49254925  #endif
    49264926
     
    49284928  {
    49294929    #ifdef DEBUG
    4930       WriteLog("Surface not locked!\n");
     4930      dprintf(("Surface not locked!\n"));
    49314931    #endif
    49324932    return(DDERR_NOTLOCKED);
     
    49354935  if(NULL!=lpSurfaceRect)
    49364936  {
    4937     WriteLog("Unlock rectangle\n");
     4937    dprintf(("Unlock rectangle\n"));
    49384938    pIRectUnlock = new DDRectangle( lpSurfaceRect->top,
    49394939                                    lpSurfaceRect->left,
     
    49434943  else
    49444944  {
    4945     WriteLog("Unlock complete surface\n");
     4945    dprintf(("Unlock complete surface\n"));
    49464946    pIRectUnlock = new DDRectangle( 0, 0, me->height, me->width);
    49474947  }
    49484948
    4949   WriteLog( "Try to Unlock Rectangle (%d/%d) x (%d/%d)\n",
     4949  dprintf(( "Try to Unlock Rectangle (%d/%d) x (%d/%d)\n",
    49504950            pIRectUnlock->Top(),
    49514951            pIRectUnlock->Left(),
    49524952            pIRectUnlock->Bottom(),
    4953             pIRectUnlock->Right() );
    4954 
    4955   #ifdef DEBUG
    4956     WriteLog("Start Emuneration of Locked Rects\n");
     4953            pIRectUnlock->Right() ));
     4954
     4955  #ifdef DEBUG
     4956    dprintf(("Start Emuneration of Locked Rects\n"));
    49574957  #endif
    49584958
     
    49614961  {
    49624962    pIRectEnum = (DDRectangle*)DPA_FastGetPtr(me->DPA_LockedRects,i);
    4963     WriteLog( "Test with Rectangle (%d/%d) x (%d/%d)\n",
     4963    dprintf(( "Test with Rectangle (%d/%d) x (%d/%d)\n",
    49644964              pIRectEnum->Top(),
    49654965              pIRectEnum->Left(),
    49664966              pIRectEnum->Bottom(),
    4967               pIRectEnum->Right() );
     4967              pIRectEnum->Right() ));
    49684968
    49694969    Found = (*pIRectEnum == *pIRectUnlock);
     
    49714971    {
    49724972      #ifdef DEBUG
    4973         WriteLog("Not Found, try Next rect\n");
     4973        dprintf(("Not Found, try Next rect\n"));
    49744974      #endif
    49754975      i++;
     
    49784978    else
    49794979    {
    4980       WriteLog("Found Rect\n");
     4980      dprintf(("Found Rect\n"));
    49814981    }
    49824982    #endif
     
    49894989    {
    49904990      #ifdef DEBUG
    4991         WriteLog("Rectangle not locked, wrong Rect!\n\n");
     4991        dprintf(("Rectangle not locked, wrong Rect!\n\n"));
    49924992      #endif
    49934993      return(DDERR_INVALIDRECT);
     
    49994999  {
    50005000    #ifdef DEBUG
    5001       WriteLog("Remove Rect from Seq.\n");
     5001      dprintf(("Remove Rect from Seq.\n"));
    50025002    #endif
    50035003
     
    50075007    {
    50085008      #ifdef DEBUG
    5009         WriteLog("No Locked Rects left for surface\n");
     5009        dprintf(("No Locked Rects left for surface\n"));
    50105010      #endif
    50115011      me->fLocked = FALSE;
     
    50155015    {
    50165016      #ifdef DEBUG
    5017         WriteLog( "ColorConversion Needed %08X != %08X\n",
     5017        dprintf(( "ColorConversion Needed %08X != %08X\n",
    50185018                  me->pFrameBuffer,
    5019                   me->pDiveBuffer);
     5019                  me->pDiveBuffer));
    50205020      #endif
    50215021      me->ColorConversion(lpSurfaceRect);
     
    50245024    me->lpVtbl->ChangeUniquenessValue(me);
    50255025
    5026     WriteLog("Unlock OK\n\n");
     5026    dprintf(("Unlock OK\n\n"));
    50275027    rc = DD_OK;
    50285028  }
     
    50355035{
    50365036  #ifdef DEBUG
    5037     WriteLog("SurfUpdateOverlay\n");
     5037    dprintf(("SurfUpdateOverlay\n"));
    50385038  #endif
    50395039  return(DD_OK);
     
    50445044{
    50455045  #ifdef DEBUG
    5046     WriteLog("SurfUpdateOverlay\n");
     5046    dprintf(("SurfUpdateOverlay\n"));
    50475047  #endif
    50485048  return(DD_OK);
     
    50535053{
    50545054  #ifdef DEBUG
    5055     WriteLog("SurfUpdateOverlayDisplay\n");
     5055    dprintf(("SurfUpdateOverlayDisplay\n"));
    50565056  #endif
    50575057  return(DD_OK);
     
    50625062{
    50635063  #ifdef DEBUG
    5064     WriteLog("SurfUpdateOverlayZOrder\n");
     5064    dprintf(("SurfUpdateOverlayZOrder\n"));
    50655065  #endif
    50665066  return(DD_OK);
     
    50715071{
    50725072  #ifdef DEBUG
    5073     WriteLog("SurfUpdateOverlayZOrder4\n");
     5073    dprintf(("SurfUpdateOverlayZOrder4\n"));
    50745074  #endif
    50755075  return(DD_OK);
     
    50825082
    50835083  #ifdef DEBUG
    5084     WriteLog("SurfGetDDInterface\n");
     5084    dprintf(("SurfGetDDInterface\n"));
    50855085  #endif
    50865086  *lplpDirectDraw = (LPVOID FAR *)me->lpDraw;
     
    50955095  // from malloc to DosAllocMem and use OBJ_TILE flag
    50965096  #ifdef DEBUG
    5097     WriteLog("SurfPageLock\n");
     5097    dprintf(("SurfPageLock\n"));
    50985098  #endif
    50995099  return(DD_OK);
     
    51045104{
    51055105  #ifdef DEBUG
    5106     WriteLog("SurfPageUnlock\n");
     5106    dprintf(("SurfPageUnlock\n"));
    51075107  #endif
    51085108  return(DD_OK);
     
    51155115{
    51165116  #ifdef DEBUG
    5117     WriteLog("SurfSetSurfaceDesc\n");
     5117    dprintf(("SurfSetSurfaceDesc\n"));
    51185118  #endif
    51195119
     
    51465146{
    51475147  #ifdef DEBUG
    5148     WriteLog("SurfSetSurfaceDesc4\n");
     5148    dprintf(("SurfSetSurfaceDesc4\n"));
    51495149  #endif
    51505150
     
    51875187
    51885188  #ifdef DEBUG
    5189     WriteLog("SurfSetPrivateData\n");
     5189    dprintf(("SurfSetPrivateData\n"));
    51905190  #endif
    51915191
     
    53705370
    53715371  #ifdef DEBUG
    5372     WriteLog("SurfGetPrivateData\n");
     5372    dprintf(("SurfGetPrivateData\n"));
    53735373  #endif
    53745374
     
    54305430
    54315431  #ifdef DEBUG
    5432     WriteLog("SurfFreePrivateData\n");
     5432    dprintf(("SurfFreePrivateData\n"));
    54335433  #endif
    54345434
     
    54755475{
    54765476  #ifdef DEBUG
    5477     WriteLog("SurfGetUniquenessValue\n");
     5477    dprintf(("SurfGetUniquenessValue\n"));
    54785478  #endif
    54795479  OS2IDirectDrawSurface *me = (OS2IDirectDrawSurface *)This;
     
    54945494
    54955495  #ifdef DEBUG
    5496     WriteLog("SurfChangeUniquenessValue\n");
     5496    dprintf(("SurfChangeUniquenessValue\n"));
    54975497  #endif
    54985498  me->dwUniqueValue++;
Note: See TracChangeset for help on using the changeset viewer.