- Timestamp:
- Nov 15, 1999, 8:01:30 PM (26 years ago)
- Location:
- trunk/src/ddraw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2SURFACE.CPP
r1746 r1752 1247 1247 // Yes => No Colorconversion is needed so point to the same buffer 1248 1248 pDiveBuffer = pFrameBuffer; 1249 dwPitchDB = dwPitchFB; 1249 1250 } 1250 1251 else … … 1416 1417 if(NULL!=lpDestRect) 1417 1418 { 1418 #ifdef DEBUG 1419 dprintf(("DDRAW: Fill only Rect(%d,%d)(%d,%d)\n", lpDestRect->left, lpDestRect->top, 1420 lpDestRect->right, lpDestRect->bottom)); 1421 #endif 1419 dprintf(("DDRAW: Fill only Rect(%d,%d)(%d,%d)\n", lpDestRect->left, lpDestRect->top, 1420 lpDestRect->right, lpDestRect->bottom)); 1422 1421 FillWidth = lpDestRect->right - lpDestRect->left; 1423 1422 FillHeight = lpDestRect->bottom - lpDestRect->top -1; … … 1434 1433 } 1435 1434 dprintf(("DDRAW: 0x%08X (%d/%d) at\n", pLine,FillWidth,FillHeight)); 1435 1436 // Better safe then sorry 1437 if(FillHeight<=0) 1438 return(DD_OK); 1436 1439 1437 1440 if(pDiveBuffer!=pFrameBuffer) … … 1488 1491 { 1489 1492 if(8==lpDraw->GetScreenBpp()) 1490 dwFillColor = pPal16[dwFillColor]; 1491 } 1492 dwColor = (dwFillColor<<16) + (dwFillColor); 1493 dwColor = (pPal16[dwFillColor]<<16) + pPal16[dwFillColor]; 1494 } 1495 else 1496 { 1497 dwColor = (dwFillColor<<16) + (dwFillColor); 1498 } 1493 1499 dprintf(("DDRAW: Fill with 0x%08X\n",dwColor)); 1494 1500 for(i=0,pColor = (DWORD*)pLine;i<(FillWidth/2);i++) … … 1523 1529 } // end switch(dest->DDSurfaceDesc.ddpfPixelFormat.dwRGBBitCount) 1524 1530 1525 1531 // First Line has been Filled so FillHeight-1 are left by one 1532 FillHeight--; 1526 1533 pFillPos = pLine + dwPitchDB; 1527 FillWidth = FillWidth*dwBytesPPDive;; 1534 FillWidth = FillWidth*dwBytesPPDive; 1535 1528 1536 for( y=0;y<FillHeight;y++,pFillPos+=dwPitchDB) 1529 1537 { … … 1540 1548 if(pDiveBuffer!=pFrameBuffer) 1541 1549 { 1542 dprintf(("DDRAW: CC-Mode Fill FrameBuffer \n"));1550 dprintf(("DDRAW: CC-Mode Fill FrameBuffer %08X\n",pFrameBuffer)); 1543 1551 1544 1552 if(NULL!=lpDestRect) 1545 1553 { 1554 dprintf(("DDRAW: Fill only Rect(%d,%d)(%d,%d)\n", lpDestRect->left, lpDestRect->top, 1555 lpDestRect->right, lpDestRect->bottom)); 1546 1556 FillWidth = lpDestRect->right - lpDestRect->left; 1547 1557 FillHeight = lpDestRect->bottom - lpDestRect->top -1; 1548 1558 pLine = pFrameBuffer + 1549 1559 (lpDestRect->top*dwPitchFB) + 1550 (lpDestRect->left* lpDraw->GetScreenBpp());1560 (lpDestRect->left*(lpDraw->GetScreenBpp()>>3)); 1551 1561 } 1552 1562 else 1553 1563 { 1564 dprintf(("DDRAW: Fill all at addr ")); 1554 1565 FillWidth = width; 1555 1566 FillHeight = height -1; 1556 1567 pLine = pFrameBuffer; 1557 1568 } 1569 dprintf(("DDRAW: 0x%08X width,height(%d/%d) \n", pLine,FillWidth,FillHeight)); 1558 1570 1559 1571 // Colorconversion mode we must also fill the other buffer … … 1564 1576 dwColor = (dwFillColor<<24) + (dwFillColor<<16) + 1565 1577 (dwFillColor<<8) + (dwFillColor); 1566 dprintf(("DDRAW: Fill with 0x%08X\n",dwColor));1578 dprintf(("DDRAW: Fill with %08X => 0x%08X\n",dwFillColor,dwColor)); 1567 1579 for(i=0,pColor = (DWORD*)pLine;i<(FillWidth/4);i++) 1568 1580 pColor[i] = dwColor; 1569 1581 if(FillWidth % 4) 1570 1582 { 1571 1583 pFillPos = (char*) (&pColor[i-1]); 1572 1584 for(i=0;i<FillWidth % 4;i++) 1573 1585 pFillPos[i] = (UCHAR) dwColor; … … 1600 1612 for(i=0,pColor = (DWORD*)pLine;i<FillWidth;i++) 1601 1613 pColor[i] = dwColor; 1602 } 1614 break; 1615 default: 1616 dprintf(("DDRAW: Unsupported # of Bits %d",lpDraw->GetScreenBpp())); 1617 } 1618 1619 // First Line has been Filled so FillHeight-1 are left by one 1620 FillHeight--; 1603 1621 1604 1622 pFillPos = pLine + dwPitchFB; 1605 FillWidth = FillWidth* lpDraw->GetScreenBpp();1623 FillWidth = FillWidth*(lpDraw->GetScreenBpp()>>3); 1606 1624 for( y=0;y<FillHeight;y++,pFillPos+=dwPitchFB) 1607 1625 { -
trunk/src/ddraw/iccio1.asm
r211 r1752 240 240 io_init1 ENDP 241 241 242 ; void in_init(short) 243 PUBLIC io_init2 244 ALIGN 04H 245 io_init2 PROC 246 247 MOV gdt, AX ; store in ioentry address selector part 248 XOR EAX, EAX ; EAX = 0 249 MOV DWORD PTR [ioentry], EAX ; clear ioentry offset part 250 ; return code = 0 (in EAX) 251 252 ; now use this function to raise the IOPL 253 MOV EBX,13 ; special function code 254 CALL FWORD PTR [ioentry] ; CALL intersegment indirect 16:32 255 256 XOR EAX, EAX ; return code = 0 257 ret 258 io_init2 ENDP 259 242 260 PUBLIC io_exit1 243 261 ALIGN 04H … … 264 282 io_exit1 ENDP 265 283 284 285 266 286 ; for diagnostic only 267 287
Note:
See TracChangeset
for help on using the changeset viewer.