Changeset 21483 for trunk/src


Ignore:
Timestamp:
Nov 29, 2010, 2:07:07 PM (15 years ago)
Author:
dmik
Message:

ddraw: Don't define CINTERFACE twice.

Location:
trunk/src/ddraw
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/clipper.cpp

    r21479 r21483  
    2020#include <memory.h>
    2121
    22 #define CINTERFACE
     22#ifndef CINTERFACE
     23#define CINTERFACE 1
     24#endif
    2325#include "ddraw2d.h"
    2426#include "clipper.h"
  • trunk/src/ddraw/ddclipper.cpp

    r21479 r21483  
    2020#include <stdio.h>
    2121
    22 #define CINTERFACE
     22#ifndef CINTERFACE
     23#define CINTERFACE 1
     24#endif
    2325#include "ddraw2d.h"
    2426#include "clipper.h"
  • trunk/src/ddraw/ddmain.cpp

    r21479 r21483  
    2323#include <stdio.h>
    2424
    25 #define CINTERFACE
     25#ifndef CINTERFACE
     26#define CINTERFACE 1
     27#endif
    2628#include "ddraw2d.h"
    2729#include "winerror.h"
  • trunk/src/ddraw/ddraw2d.cpp

    r21479 r21483  
    2222#include <winuser32.h>
    2323
     24#ifndef CINTERFACE
     25#define CINTERFACE 1
     26#endif
    2427#define INITGUID
    25 #define CINTERFACE
    2628#include "ddraw2d.h"
    2729#include "clipper.h"
  • trunk/src/ddraw/ddraw3d.cpp

    r21479 r21483  
    2020#include <winbase.h>
    2121
    22 #define CINTERFACE
     22#ifndef CINTERFACE
     23#define CINTERFACE 1
     24#endif
    2325#include "ddraw2d.h"
    2426#include "clipper.h"
  • trunk/src/ddraw/palette.cpp

    r21479 r21483  
    2121#include <memory.h>
    2222
    23 #define CINTERFACE
     23#ifndef CINTERFACE
     24#define CINTERFACE 1
     25#endif
    2426#include "ddraw2d.h"
    2527#include "clipper.h"
  • trunk/src/ddraw/surface.cpp

    r21479 r21483  
    2525#include <fourcc.h>
    2626
    27 #define CINTERFACE
     27#ifndef CINTERFACE
     28#define CINTERFACE 1
     29#endif
    2830#include "ddraw2d.h"
    2931#include "clipper.h"
  • trunk/src/ddraw/surfacehlp.cpp

    r21479 r21483  
    1313#include <fourcc.h>
    1414
    15 #define CINTERFACE
     15#ifndef CINTERFACE
     16#define CINTERFACE 1
     17#endif
    1618#include "ddraw2d.h"
    1719#include "clipper.h"
     
    572574  {
    573575    //  +-------+     +-------+      +-------+
    574     //  |S      |     |S      |      |S      | 
    575     //  |   +---|---+ +-------+  +---|---+   | 
    576     //  |   | D |   | | D     |  | D |   |   | 
    577     //  +-------+   | +-------+  |   +-------+ 
    578     //      |       | |       |  |       |     
     576    //  |S      |     |S      |      |S      |
     577    //  |   +---|---+ +-------+  +---|---+   |
     578    //  |   | D |   | | D     |  | D |   |   |
     579    //  +-------+   | +-------+  |   +-------+
     580    //      |       | |       |  |       |
    579581    //      +-------+ +-------+  +-------+
    580582    //
  • trunk/src/ddraw/surfblit.cpp

    r21479 r21483  
    2525#include <fourcc.h>
    2626
    27 #define CINTERFACE
     27#ifndef CINTERFACE
     28#define CINTERFACE 1
     29#endif
    2830#include "ddraw2d.h"
    2931#include "clipper.h"
     
    196198
    197199  //src == NULL for colorfill
    198   if(src) 
     200  if(src)
    199201  {
    200202   if (NULL!=lpSrcRect)
     
    259261    SrcRect.right  = src->width;
    260262   }
    261  
     263
    262264   if(src->fLocked)
    263265   {
     
    299301  if(dest->diveBufNr == DIVE_BUFFER_SCREEN &&
    300302     !(dwFlags & (DDBLT_COLORFILL|DDBLT_DEPTHFILL|DDBLT_ROP) ) &&
    301      dest->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount > 8 && 
     303     dest->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount > 8 &&
    302304     src->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount > 8)
    303305  {
     
    311313      if( (src->DDSurfaceDesc.dwHeight == srcheight &&
    312314           src->DDSurfaceDesc.dwWidth  == srcwidth) ||
    313           (srcwidth != destwidth && srcheight != destheight) ) 
     315          (srcwidth != destwidth && srcheight != destheight) )
    314316      {
    315317          SETUP_BLITTER          sBlt = {0};
     
    333335          sBlt.pVisDstRects      = NULL;
    334336
    335           if(dest->lpClipper && dest->lpClipper->IsClipListChangedInt()) 
     337          if(dest->lpClipper && dest->lpClipper->IsClipListChangedInt())
    336338          {
    337339              DWORD rgnsize;
    338               if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, NULL, &rgnsize) == DD_OK) 
     340              if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, NULL, &rgnsize) == DD_OK)
    339341              {
    340342                  LPRGNDATA lpRgnData = (LPRGNDATA)alloca(rgnsize);
     
    343345                      goto dodiveblit;
    344346                  }
    345                   if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, lpRgnData, &rgnsize) == DD_OK) 
     347                  if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, lpRgnData, &rgnsize) == DD_OK)
    346348                  {
    347349                      OS2RECTL *pRectl = (OS2RECTL *)&lpRgnData->Buffer;
     
    352354                      }
    353355                      dprintf(("visible region"));
    354                       for(i=0;i<lpRgnData->rdh.nCount;i++) 
     356                      for(i=0;i<lpRgnData->rdh.nCount;i++)
    355357                      {
    356358                          //win32 -> os2 coordinates (region data in screen coordinates)
     
    413415  //TODO: do we need to check the source for clipping information in case
    414416  //      the app wants to copy from the frame buffer?
    415   if(dest->lpClipper) 
     417  if(dest->lpClipper)
    416418  {
    417419      DWORD rgnsize;
    418       if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, NULL, &rgnsize) == DD_OK) 
     420      if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, NULL, &rgnsize) == DD_OK)
    419421      {
    420422          LPRGNDATA lpRgnData = (LPRGNDATA)alloca(rgnsize);
     
    423425              goto doblit;
    424426          }
    425           if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, lpRgnData, &rgnsize) == DD_OK) 
     427          if(ClipGetClipList((IDirectDrawClipper*)dest->lpClipper, NULL, lpRgnData, &rgnsize) == DD_OK)
    426428          {
    427429              RECT newdest, newsrc;
     
    431433              QueryPerformanceCounter(&liStart);
    432434#endif
    433               for(i=0;i<lpRgnData->rdh.nCount;i++) 
     435              for(i=0;i<lpRgnData->rdh.nCount;i++)
    434436              {
    435437                  dprintf(("Clip list %d (%d,%d)(%d,%d)", i, lpClipRect[i].left, lpClipRect[i].bottom, lpClipRect[i].right, lpClipRect[i].top));
    436438
    437                   if(IntersectRect(&newdest, &DestRect, &lpClipRect[i]) == TRUE) 
     439                  if(IntersectRect(&newdest, &DestRect, &lpClipRect[i]) == TRUE)
    438440                  {
    439441                      //TODO: This is not correct for stretching blits
     
    446448//                      DDSURFACEDESC2 surfdesc = {0};
    447449//                      SurfLock4(dest, &newdest, &surfdesc, 0, 0);
    448    
     450
    449451                      ret = SurfDoBlt(This, &newdest, lpDDSrcSurface, (lpSrcRect) ? &newsrc : NULL, dwFlags, lpDDBltFx);
    450452                      if(ret != DD_OK) {
  • trunk/src/ddraw/surfoverlay.cpp

    r21479 r21483  
    2525#include <fourcc.h>
    2626
    27 #define CINTERFACE
     27#ifndef CINTERFACE
     28#define CINTERFACE 1
     29#endif
    2830#include "ddraw2d.h"
    2931#include "clipper.h"
Note: See TracChangeset for help on using the changeset viewer.