Changeset 8830 for trunk/src/ddraw/OS2SURFACE.CPP
- Timestamp:
- Jul 3, 2002, 5:44:39 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2SURFACE.CPP
r8821 r8830 1 /* $Id: OS2SURFACE.CPP,v 1.4 5 2002-07-02 09:55:12sandervl Exp $ */1 /* $Id: OS2SURFACE.CPP,v 1.46 2002-07-03 15:44:37 sandervl Exp $ */ 2 2 3 3 /* … … 5975 5975 static char Scanline[6400]; // sufficient for 1600 at 32 bit 5976 5976 5977 if(sizeof(Scanline) < lPitch) { 5978 DebugInt3(); //oh, oh 5979 return; 5980 } 5977 5981 // Bridge, we may got a problem ;) 5978 5982 // Check for Overlapping Rects … … 5981 5985 pSrcPos = pBuffer; 5982 5986 5983 if(lpDestRect->top <=lpSrcRect->top)5987 if(lpDestRect->top > lpSrcRect->top) 5984 5988 { 5985 5989 // +-------+ +-------+ +-------+ 5986 // |S | |S | |S | +---+---+---+5987 // | +---|---+ +-------+ +---|---+ | |S/D|D/S| |5988 // | | D | | | D | | D | | | | | | |5989 // +-------+ | +-------+ | +-------+ | | | |5990 // | | | | | | +---+---+---+5990 // |S | |S | |S | 5991 // | +---|---+ +-------+ +---|---+ | 5992 // | | D | | | D | | D | | | 5993 // +-------+ | +-------+ | +-------+ 5994 // | | | | | | 5991 5995 // +-------+ +-------+ +-------+ 5992 5996 // 5993 5997 // We got one of the above cases (or no overlapping) so copy from bottom up 5994 5998 5995 pBltPos += (lpDestRect->left * bpp) + lPitch * lpDestRect->top;5999 pBltPos += (lpDestRect->left * bpp) + lPitch * (lpDestRect->bottom-1); 5996 6000 pSrcPos += (lpSrcRect->left * bpp) + lPitch * (lpSrcRect->bottom-1); 5997 6001 BlitHeight = lpDestRect->bottom - lpDestRect->top; … … 6002 6006 memcpy(Scanline,pSrcPos,BlitWidth); 6003 6007 memcpy(pBltPos,Scanline,BlitWidth); 6004 pBltPos += lPitch;6008 pBltPos -= lPitch; 6005 6009 pSrcPos -= lPitch; 6006 6010 if(! (--BlitHeight)) … … 6012 6016 // +-------+ +-------+ +-------+ 6013 6017 // | D | | D | | D | 6014 // | +---|---+ +-------+ +---|---+ | 6015 // | |S | | |S | |S | | | 6016 // +-------+ | +-------+ | +-------+ 6017 // | | | | | | 6018 // +-------+ +-------+ +-------+ 6018 // | +---|---+ +-------+ +---|---+ | +---+---+---+ 6019 // | |S | | |S | |S | | | |S |S/D| D | 6020 // +-------+ | +-------+ | +-------+ | | | | 6021 // | | | | | | | | | | 6022 // +-------+ +-------+ +-------+ +---+---+---+ 6019 6023 // 6020 6024 // We got one of the above cases so copy top down
Note:
See TracChangeset
for help on using the changeset viewer.