- Timestamp:
- Dec 21, 1999, 2:28:20 AM (26 years ago)
- Location:
- trunk/src/ddraw
- Files:
-
- 4 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2CLIPPER.CPP
r1568 r2174 1 /* $Id: OS2CLIPPER.CPP,v 1.9 1999-12-21 01:28:15 hugh Exp $ */ 2 3 /* 4 * DX clipper class routines 5 * 6 * Copyright 1998 Sander van Leeuwen 7 * Copyright 1999 Markus Montkowski 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 11 */ 12 1 13 #include <memory.h> 2 14 -
trunk/src/ddraw/OS2CLIPPER.H
r422 r2174 1 /* $Id: OS2CLIPPER.H,v 1.6 1999-12-21 01:28:19 hugh Exp $ */ 2 3 /* 4 * DX clipper class definition 5 * 6 * Copyright 1998 Sander va Leeuwen 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 1 11 #ifndef __OS2CLIPPER_H__ 2 12 #define __OS2CLIPPER_H__ -
trunk/src/ddraw/OS2D3D.CPP
r1568 r2174 1 /* $Id: OS2D3D.CPP,v 1.9 1999-12-21 01:28:15 hugh Exp $ */ 2 3 /* 4 * DX clipper class routines 5 * 6 * Copyright 1998 Sander van Leeuwen 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 11 1 12 #include <memory.h> 2 13 -
trunk/src/ddraw/OS2DDRAW.CPP
r1746 r2174 1 /* $Id: OS2DDRAW.CPP,v 1.18 1999-12-21 01:28:15 hugh Exp $ */ 2 3 /* 4 * DX Draw base class implementation 5 * 6 * Copyright 1998 Sander va Leeuwen 7 * Copyright 1999 Markus Montkowski 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 11 */ 1 12 #include <stdlib.h> 2 13 #include <string.h> … … 1479 1490 dprintf(("DDRAW: SetCooperativeLevel: hwnd %X, Flags %X\n", hwndClient, dwFlags)); 1480 1491 #endif 1481 1492 me->dwCoopMode = dwFlags; 1493 if(!(DDSCL_NORMAL & dwFlags)) 1494 { 1495 // client window req. for all none DDSCL_NORMAL modes 1496 if(NULL==hwndClient) 1497 return(DDERR_INVALIDPARAMS); 1498 } 1482 1499 me->hwndClient = hwndClient; 1483 1500 #if 0 … … 1504 1521 me->screenheight = dwHeight; 1505 1522 me->screenbpp = dwBPP; 1523 1524 if(me->dwCoopMode & DDSCL_FULLSCREEN) 1525 { 1526 SetWindowPos(me->hwndClient, HWND_TOP,0,0,dwWidth,dwHeight,0); 1527 } 1506 1528 1507 1529 memset(&sBlt,0,sizeof(sBlt)); … … 1542 1564 me->screenbpp = dwBPP; 1543 1565 1566 if(me->dwCoopMode & DDSCL_FULLSCREEN) 1567 { 1568 SetWindowPos(me->hwndClient, HWND_TOP,0,0,dwWidth,dwHeight,0); 1569 } 1570 1544 1571 memset(&sBlt,0,sizeof(sBlt)); 1545 1572 sBlt.ulStructLen = sizeof(sBlt); -
trunk/src/ddraw/OS2DDRAW.H
r913 r2174 1 /* $Id: OS2DDRAW.H,v 1.9 1999-12-21 01:28:19 hugh Exp $ */ 2 3 /* 4 * DX Draw base class definition 5 * 6 * Copyright 1998 Sander va Leeuwen 7 * Copyright 1999 Markus Montkowski 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 11 */ 12 1 13 #ifndef __OS2DDRAW_HPP__ 2 14 #define __OS2DDRAW_HPP__ … … 67 79 char *pFrameBuffer; 68 80 HWND hwndClient; 81 DWORD dwCoopMode; 69 82 int screenwidth, screenheight, screenbpp; 70 83 BOOL PrimaryExists; -
trunk/src/ddraw/OS2PALETTE.CPP
r1568 r2174 1 /* $Id: OS2PALETTE.CPP,v 1.12 1999-12-21 01:28:16 hugh Exp $ */ 2 3 /* 4 * DX palette class implementation 5 * 6 * Copyright 1998 Sander va Leeuwen 7 * Copyright 1999 Markus Montkowski 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 11 */ 12 1 13 #include <stdio.h> 2 14 #include <stdlib.h> -
trunk/src/ddraw/OS2PALETTE.H
r587 r2174 1 /* $Id: OS2PALETTE.H,v 1.7 1999-12-21 01:28:19 hugh Exp $ */ 2 3 /* 4 * DX palette class definition 5 * 6 * Copyright 1998 Sander va Leeuwen 7 * Copyright 1999 Markus Montkowski 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 11 */ 12 1 13 #ifndef __OS2PALETTE_H__ 2 14 #define __OS2PALETTE_H__ -
trunk/src/ddraw/OS2PALSET.CPP
r522 r2174 1 /* $Id: OS2PALSET.CPP,v 1.7 1999-12-21 01:28:16 hugh Exp $ */ 2 3 /* 4 * Functions used to Set the Physical Palette in OS/2 when in 8 Bit mode 5 * 6 * Copyright 1998 Sander va Leeuwen 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 1 11 #define INCL_GREALL 2 12 #define INCL_GPI … … 18 28 int i; 19 29 20 30 21 31 22 32 hps = WinGetPS(HWND_DESKTOP); … … 45 55 WinReleasePS(hps); 46 56 47 57 48 58 49 59 } … … 55 65 HDC hdc; 56 66 57 67 58 68 59 69 hps = WinGetPS( HWND_DESKTOP); … … 71 81 WinReleasePS(hps); 72 82 73 83 74 84 75 85 } -
trunk/src/ddraw/OS2PALSET.H
r211 r2174 1 /* $Id: OS2PALSET.H,v 1.5 1999-12-21 01:28:19 hugh Exp $ */ 2 3 /* 4 * Defintions for OS/2 Palette functions 5 * 6 * Copyright 1998 Sander van Leeuwen 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 1 11 #ifndef __OS2PALSET_H__ 2 #define __OS2PALSET_H__12 #define __OS2PALSET_H__ 3 13 4 #ifndef __OS2PALETTE_H__ 5 typedef struct tagPALETTEENTRY { 6 BYTE peRed; 7 BYTE peGreen; 8 BYTE peBlue; 9 BYTE peFlags; 10 } PALETTEENTRY; 11 #endif 14 #ifndef __OS2PALETTE_H__ 15 typedef struct tagPALETTEENTRY 16 { 17 BYTE peRed; 18 BYTE peGreen; 19 BYTE peBlue; 20 BYTE peFlags; 21 } PALETTEENTRY; 22 #endif 12 23 13 //void OS2SetPhysPalette(PALETTEENTRY *pDirectXPal);14 void OS2SetPhysPalette(void *pal);15 void OS2ResetPhysPalette();24 //void OS2SetPhysPalette(PALETTEENTRY *pDirectXPal); 25 void OS2SetPhysPalette(void *pal); 26 void OS2ResetPhysPalette(); 16 27 17 28 #endif -
trunk/src/ddraw/OS2SURFACE.CPP
r1752 r2174 1 /* $Id: OS2SURFACE.CPP,v 1.21 1999-12-21 01:28:16 hugh Exp $ */ 2 3 /* 4 * Direct/X Surface class implementaion 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 11 1 12 #include <stdlib.h> 2 13 #include <string.h> … … 17 28 #include "asmutil.h" 18 29 #include "bltFunc.h" 30 #include "colorconv.h" 31 #include "fillfunc.h" 19 32 #include <winerror.h> 20 33 #include <os2win.h> … … 284 297 285 298 WORD wDefaultPalete16[256]; 299 DWORD dwDefaultPalete24[256]; 286 300 BOOL fPalInit=FALSE; 287 301 … … 730 744 { 731 745 case 8: 732 BltSolid = &BltSolid8to8; 746 BltSolid = &BltSolid8to8; 747 ColorConv = NULL; 748 ColorFill = &Fill8on8; 733 749 break; 734 750 case 16: 735 BltSolid = &BltSolid8to16; 751 BltSolid = &BltSolid8to16; 752 ColorConv = &Conv8to16; 753 ColorFill = &Fill8on16; 736 754 break; 737 755 case 24: 738 BltSolid = &BltSolid8to24; 756 BltSolid = &BltSolid8to24; 757 ColorConv = &Conv8to24; 758 ColorFill = &Fill8on24; 739 759 break; 740 760 case 32: 741 BltSolid = &BltSolid8to32; 761 BltSolid = &BltSolid8to32; 762 ColorConv = &Conv8to32; 763 ColorFill = &Fill8on32; 742 764 break; 743 765 default: 744 766 dprintf(("DDRAW: Unsupported System ColorDeapth %d",lpDraw->dCaps.ulDepth)); 745 BltSolid = NULL; 767 BltSolid = NULL; 768 ColorConv = NULL; 769 ColorFill = NULL; 746 770 break; 747 771 } 748 772 break; 749 case 16:773 case 16: 750 774 switch(lpDraw->dCaps.ulDepth) 751 775 { 752 776 case 8: 753 777 BltSolid = &BltSolid16to8; 778 ColorConv = &Conv16to8; 779 ColorFill = &Fill16on8; 754 780 break; 755 781 case 16: 756 BltSolid = &BltSolid16to16; 782 BltSolid = &BltSolid16to16; 783 ColorConv = NULL; 784 ColorFill = &Fill16on16; 757 785 break; 758 786 case 24: 759 BltSolid = &BltSolid16to24; 787 BltSolid = &BltSolid16to24; 788 ColorConv = &Conv16to24; 789 ColorFill = &Fill16on24; 760 790 break; 761 791 case 32: 762 BltSolid = &BltSolid16to32; 792 BltSolid = &BltSolid16to32; 793 ColorConv = &Conv16to32; 794 ColorFill = &Fill16on32; 763 795 break; 764 796 default: 765 797 dprintf(("DDRAW: Unsupported System ColorDeapth %d",lpDraw->dCaps.ulDepth)); 766 BltSolid = NULL; 798 BltSolid = NULL; 799 ColorConv = NULL; 800 ColorFill = NULL; 767 801 break; 768 802 } 769 803 break; 770 case 24:804 case 24: 771 805 switch(lpDraw->dCaps.ulDepth) 772 806 { 773 807 case 8: 774 BltSolid = &BltSolid24to8; 808 BltSolid = &BltSolid24to8; 809 ColorConv = &Conv24to8; 810 ColorFill = &Fill24on8; 775 811 break; 776 812 case 16: 777 BltSolid = &BltSolid24to16; 813 BltSolid = &BltSolid24to16; 814 ColorConv = &Conv24to16; 815 ColorFill = &Fill24on16; 778 816 break; 779 817 case 24: 780 BltSolid = &BltSolid24to24; 818 BltSolid = &BltSolid24to24; 819 ColorConv = NULL; 820 ColorFill = &Fill24on24; 781 821 break; 782 822 case 32: 783 BltSolid = &BltSolid24to32; 823 BltSolid = &BltSolid24to32; 824 ColorConv = &Conv24to32; 825 ColorFill = &Fill24on32; 784 826 break; 785 827 default: 786 828 dprintf(("DDRAW: Unsupported System ColorDeapth %d",lpDraw->dCaps.ulDepth)); 787 BltSolid = NULL; 829 BltSolid = NULL; 830 ColorConv = NULL; 831 ColorFill = NULL; 788 832 break; 789 833 } 790 834 break; 791 case 32:835 case 32: 792 836 switch(lpDraw->dCaps.ulDepth) 793 837 { 794 838 case 8: 795 BltSolid = &BltSolid32to8; 839 BltSolid = &BltSolid32to8; 840 ColorConv = &Conv32to8; 841 ColorFill = &Fill32on8; 796 842 break; 797 843 case 16: 798 BltSolid = &BltSolid32to16; 844 BltSolid = &BltSolid32to16; 845 ColorConv = &Conv32to16; 846 ColorFill = &Fill32on16; 799 847 break; 800 848 case 24: 801 BltSolid = &BltSolid32to24; 849 BltSolid = &BltSolid32to24; 850 ColorConv = &Conv32to24; 851 ColorFill = &Fill32on24; 802 852 break; 803 853 case 32: 804 BltSolid = &BltSolid32to32; 854 BltSolid = &BltSolid32to32; 855 ColorConv = NULL; 856 ColorFill = &Fill32on32; 805 857 break; 806 858 default: 807 859 dprintf(("DDRAW: Unsupported System ColorDeapth %d",lpDraw->dCaps.ulDepth)); 808 BltSolid = NULL; 860 BltSolid = NULL; 861 ColorConv = NULL; 862 ColorFill = NULL; 809 863 break; 810 864 } … … 812 866 default: 813 867 dprintf(("DDRAW: Unsupported DX ColorDeapth %d",lpDraw->GetScreenBpp())); 814 BltSolid = NULL; 868 BltSolid = NULL; 869 ColorConv = NULL; 870 ColorFill = NULL; 815 871 break; 816 872 } … … 1402 1458 //****************************************************************************** 1403 1459 //****************************************************************************** 1404 HRESULT OS2IDirectDrawSurface:: ColorFill(LPRECT lpDestRect,DWORD dwFillColor)1405 { 1406 1407 int i, j, FillWidth, FillHeight;1408 char *pLine, *pFillPos;1409 1410 DWORD *pColor, dwColor,y;1460 HRESULT OS2IDirectDrawSurface::DoColorFill(LPRECT lpDestRect,DWORD dwFillColor) 1461 { 1462 1463 int i, FillWidth, FillHeight, Top, Left; 1464 //char *pLine, *pFillPos; 1465 1466 //DWORD *pColor, dwColor,y; 1411 1467 DWORD *pPal24; 1412 1468 WORD *pPal16; … … 1421 1477 FillWidth = lpDestRect->right - lpDestRect->left; 1422 1478 FillHeight = lpDestRect->bottom - lpDestRect->top -1; 1423 pLine = pDiveBuffer + 1424 (lpDestRect->top*dwPitchDB) + 1425 (lpDestRect->left*dwBytesPPDive); 1479 Top = lpDestRect->top; 1480 Left = lpDestRect->left; 1426 1481 } 1427 1482 else 1428 1483 { 1429 1484 dprintf(("DDRAW: Fill all at addr ")); 1485 Top = 0; 1486 Left = 0; 1430 1487 FillWidth = width; 1431 1488 FillHeight = height -1; 1432 pLine = pDiveBuffer;1433 } 1434 dprintf(("DDRAW: 0x%08X (%d/%d) at\n", pLine,FillWidth,FillHeight));1489 //pLine = pDiveBuffer; 1490 } 1491 //dprintf(("DDRAW: 0x%08X (%d/%d) at\n", pLine,FillWidth,FillHeight)); 1435 1492 1436 1493 // Better safe then sorry … … 1450 1507 ((DefaultPalette[i*3+1]>>2) <<5) + 1451 1508 ((DefaultPalette[i*3]>>3) << 11); 1509 dwDefaultPalete24[i]= ((DefaultPalette[i*3+2]>>3) <<8)+ 1510 ((DefaultPalette[i*3+1]>>2) <<16) + 1511 ((DefaultPalette[i*3]>>3) << 24); 1452 1512 dprintf(( " # %d : RGB=%02X/%02X/%02X => %04X\n", 1453 1513 i, … … 1463 1523 } 1464 1524 pPal16 = &wDefaultPalete16[0]; 1525 pPal24 = &dwDefaultPalete24[0]; 1465 1526 } 1466 1527 else … … 1471 1532 } 1472 1533 1534 if(NULL!=ColorFill) 1535 ColorFill( pDiveBuffer, pFrameBuffer, Top, Left, 1536 FillWidth, FillHeight, dwPitchDB,dwPitchFB, 1537 dwFillColor,(16==lpDraw->dCaps.ulDepth)?(VOID*)pPal16:(VOID*)pPal24); 1538 else 1539 { 1540 dprintf(("DDRAW: ColorFill function is NULL!!")); 1541 } 1542 /* 1473 1543 switch(dwBytesPPDive) 1474 1544 { … … 1634 1704 } 1635 1705 } 1636 1706 */ 1637 1707 return(DD_OK); 1638 1708 } … … 1641 1711 void OS2IDirectDrawSurface::ColorConversion(LPRECT lpRect) 1642 1712 { 1643 char *pSrc,*pDst,*pSLine,*pDLine;1713 //char *pSrc,*pDst,*pSLine,*pDLine; 1644 1714 DWORD CCwidth,CCheight,x,y; 1645 1715 DWORD *pPal24; … … 1656 1726 ((DefaultPalette[i*3+1]>>2) <<5) + 1657 1727 ((DefaultPalette[i*3]>>3) << 11); 1728 dwDefaultPalete24[i]= ((DefaultPalette[i*3+2]>>3) <<8)+ 1729 ((DefaultPalette[i*3+1]>>2) <<16) + 1730 ((DefaultPalette[i*3]>>3) << 24); 1658 1731 dprintf(( " # %d : RGB=%02X/%02X/%02X => %04X\n", 1659 1732 i, … … 1669 1742 } 1670 1743 pPal16 = &wDefaultPalete16[0]; 1744 pPal24 = &dwDefaultPalete24[0]; 1671 1745 } 1672 1746 else … … 1678 1752 if(NULL==lpRect) 1679 1753 { 1680 pSrc = pFrameBuffer;1681 pDst = pDiveBuffer;1754 //pSrc = pFrameBuffer; 1755 //pDst = pDiveBuffer; 1682 1756 CCwidth = width; 1683 1757 CCheight = height; 1758 x = 0; 1759 y = 0; 1684 1760 } 1685 1761 else … … 1691 1767 lpRect->bottom = y; 1692 1768 // end of hack 1769 #if 0 1693 1770 pSrc = pFrameBuffer + 1694 1771 (lpRect->top * dwPitchFB) + … … 1697 1774 (lpRect->top * dwPitchDB) + 1698 1775 (lpRect->left* dwBytesPPDive); 1776 #endif 1777 y = lpRect->top; 1778 x = lpRect->left; 1699 1779 CCwidth = lpRect->right - lpRect->left; 1700 1780 CCheight = lpRect->bottom - lpRect->top; … … 1702 1782 } 1703 1783 1704 dprintf( ("H: %d W: %d\n SRC @ %08X\n DST @ %08X\n", 1705 CCheight, CCwidth, pSrc,pDst)); 1706 1784 // dprintf( ("H: %d W: %d\n SRC @ %08X\n DST @ %08X\n", 1785 // CCheight, CCwidth, pSrc,pDst)); 1786 if(NULL!=ColorConv) 1787 ColorConv( pDiveBuffer, pFrameBuffer, y, x, 1788 CCwidth, CCheight, dwPitchDB,dwPitchFB, 1789 16==lpDraw->dCaps.ulDepth?(VOID*)pPal16:(VOID*)pPal24); 1790 else 1791 { 1792 dprintf(("DDRAW: ColorConv function is NULL!!")); 1793 } 1794 1795 /* 1707 1796 pSLine = pSrc; 1708 1797 pDLine = pDst; … … 1739 1828 { 1740 1829 dprintf(("DDRAW: 8->24Bit CC")); 1830 for(y=0;CCheight;CCheight--,y++) 1831 { 1832 char *pIter; 1833 for(x=0,pIter=pDLine;x<width;x++,pIter=pDLine) 1834 { 1835 *((DWORD*)pIter) = pPal24[pSLine[x]]; 1836 pIter+=3; 1837 } 1838 pSLine += dwPitchFB; 1839 pDLine += dwPitchDB; 1840 } 1741 1841 } 1742 1842 else … … 1749 1849 { 1750 1850 dprintf(("DDRAW: 8->32Bit CC")); 1851 for(y=0;CCheight;CCheight--,y++) 1852 { 1853 for(x=0;x<width;x++) 1854 { 1855 *(((DWORD*)pDLine)+x) = pPal24[pSLine[x]]; 1856 1857 } 1858 pSLine += dwPitchFB; 1859 pDLine += dwPitchDB; 1860 } 1751 1861 } 1752 1862 else … … 1762 1872 break; 1763 1873 } 1764 1765 /*1766 SETUP_BLITTER sBlt;1767 ULONG ulDN1, ulDN2;1768 ULONG rc;1769 ulDN1 = ulDN2 = 0;1770 1771 memset(&sBlt,0,sizeof(sBlt));1772 sBlt.ulStructLen = sizeof(sBlt);1773 sBlt.fccSrcColorFormat = (FOURCC) DDSurfaceDesc.ddpfPixelFormat.dwFourCC;1774 if (NULL!=lpRect)1775 {1776 sBlt.ulSrcWidth = lpRect->right - lpRect->left;1777 sBlt.ulSrcHeight = lpRect->top - lpRect->bottom;1778 sBlt.ulSrcPosX = lpRect->left;1779 sBlt.ulSrcPosY = height - lpRect->top;1780 }1781 else1782 {1783 sBlt.ulSrcWidth = width;1784 sBlt.ulSrcHeight = height;1785 sBlt.ulSrcPosX = 0;1786 sBlt.ulSrcPosY = 0;1787 }1788 sBlt.fccDstColorFormat = FOURCC_SCRN;1789 sBlt.ulDstWidth = sBlt.ulSrcWidth;1790 sBlt.ulDstHeight = sBlt.ulSrcHeight;1791 sBlt.lDstPosX = sBlt.ulSrcPosX;1792 sBlt.lDstPosY = sBlt.ulSrcPosY;1793 sBlt.ulNumDstRects = DIVE_FULLY_VISIBLE;1794 1795 dprintf( ("Colorconversion:\n FCC SRC %08X\n FCC DST %08X\n",1796 sBlt.fccSrcColorFormat,1797 sBlt.fccDstColorFormat ));1798 1799 rc = DiveAllocImageBuffer( hDiveCC,1800 &ulDN1,1801 sBlt.fccSrcColorFormat,1802 width,1803 height,1804 dwPitchFB,1805 (PBYTE)pFrameBuffer);1806 dprintf("AllocDiveSrc Buffer rc= 0x%08X\n",rc);1807 1808 rc = DiveAllocImageBuffer( hDiveCC,1809 &ulDN2,1810 sBlt.fccDstColorFormat,1811 width,1812 height,1813 dwPitchDB,1814 (PBYTE)pDiveBuffer);1815 dprintf(("DDRAW: AllocDiveDst Buffer rc= 0x%08X\n",rc));1816 1817 rc = DiveSetupBlitter( hDiveCC,1818 &sBlt);1819 dprintf(("DDRAW: SetupBlitter rc= %X\n",rc));1820 1821 rc = DiveBlitImage( hDiveCC,1822 ulDN1,1823 ulDN2);1824 1825 dprintf(("DDRAW: Blit rc= %X\n",rc));1826 1827 rc = DiveFreeImageBuffer( hDiveCC,1828 ulDN1);1829 dprintf(("DDRAW: Free Src rc= %X\n",rc));1830 1831 rc = DiveFreeImageBuffer( hDiveCC,1832 ulDN2);1833 1834 dprintf(("DDRAW: Free dst rc= %X\n",rc));1835 1874 */ 1836 1875 } … … 2488 2527 return DDERR_INVALIDPARAMS; 2489 2528 2490 // ToDo : as we fill the DiveBuffer check if we need to convert the 2491 // specified color 2492 2493 dest->ColorFill(lpDestRect,lpDDBltFx->dwFillColor); 2529 dest->DoColorFill(lpDestRect,lpDDBltFx->dwFillColor); 2494 2530 2495 2531 return(DD_OK); // according to the M$ DDK only one flag shall/can be set. … … 2530 2566 { 2531 2567 // ToDo: Realy implement code to get the correct index for black in 8 Bitmode 2532 dest-> ColorFill(lpDestRect, 0 );2568 dest->DoColorFill(lpDestRect, 0 ); 2533 2569 } 2534 2570 else 2535 dest-> ColorFill(lpDestRect, 0);2571 dest->DoColorFill(lpDestRect, 0); 2536 2572 return DD_OK; 2537 2573 } … … 2541 2577 if(1==dest->dwBytesPPDive) 2542 2578 { 2543 // ToDo: Realy implement code to get the correct index for blackin 8 Bitmode2544 dest-> ColorFill(lpDestRect, 0xFFFFFFFF );2579 // ToDo: Realy implement code to get the correct index for white in 8 Bitmode 2580 dest->DoColorFill(lpDestRect, 0xFFFFFFFF ); 2545 2581 } 2546 2582 else 2547 dest-> ColorFill(lpDestRect, 0xFFFFFFFF);2548 return DD_OK;2583 dest->DoColorFill(lpDestRect, 0xFFFFFFFF); 2584 return (DD_OK); 2549 2585 } 2550 2586 -
trunk/src/ddraw/OS2SURFACE.H
r1746 r2174 1 /* $Id: OS2SURFACE.H,v 1.13 1999-12-21 01:28:19 hugh Exp $ */ 2 3 /* 4 * Direct/X Surface class 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 11 1 12 #ifndef __OS2SURFACE_H__ 2 13 #define __OS2SURFACE_H__ … … 52 63 53 64 private: 54 HRESULT ColorFill(LPRECT, DWORD);65 HRESULT DoColorFill(LPRECT, DWORD); 55 66 void (__cdecl *BltSolid)( char *pDBDst, 56 67 char *pFBDst, … … 68 79 DWORD dwPitchFBSrc 69 80 ); 81 void (__cdecl *ColorConv)( char *pDB, 82 char *pFB, 83 DWORD dwTop, 84 DWORD dwLeft, 85 DWORD dwWidth, 86 DWORD dwHeight, 87 DWORD dwPitchDB, 88 DWORD dwPitchFB, 89 VOID *pPalette 90 ); 91 void (__cdecl *ColorFill)( char *pDBDst, 92 char *pFBDst, 93 DWORD dwDstTop, 94 DWORD dwDstLeft, 95 DWORD dwWidth, 96 DWORD dwHeight, 97 DWORD dwPitchDBDst, 98 DWORD dwPitchFBDst, 99 DWORD dwColor, 100 VOID *pPalette 101 ); 70 102 protected: 71 103 HRESULT lastError; -
trunk/src/ddraw/asmutil.asm
r211 r2174 1 ; $Id: asmutil.asm,v 1.5 1999-12-21 01:28:19 hugh Exp $ 2 3 ; 1 4 ; asmutil.asm Color key bit blitting for DirectDraw 2 5 ; 3 6 ; Copyright 1998 Sander van Leeuwen 4 7 ; 1999 Markus Montkowski 8 ; 9 ; Project Odin Software License can be found in LICENSE.TXT 10 ; 5 11 6 12 NAME asmutil -
trunk/src/ddraw/asmutil.h
r211 r2174 1 /* $Id: asmutil.h,v 1.5 1999-12-21 01:28:17 hugh Exp $ */ 2 1 3 /* 2 4 * asmutil.asm function definition … … 4 6 * Copyright 1998 Sander van Leeuwen 5 7 * 1999 Markus Montkowski 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 6 11 */ 7 12 -
trunk/src/ddraw/bltFunc.cpp
r1746 r2174 1 /* $Id: bltFunc.cpp,v 1.2 1999-12-21 01:28:15 hugh Exp $ */ 2 3 /* 4 * Blitting functions 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 11 1 12 #include <memory.h> 2 13 #include <misc.h> -
trunk/src/ddraw/bltFunc.h
r1746 r2174 1 /* $Id: bltFunc.h,v 1.2 1999-12-21 01:28:17 hugh Exp $ */ 2 3 /* 4 * Blitting functions definitions 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 1 11 2 12 -
trunk/src/ddraw/ddraw.CPP
r1568 r2174 1 /* $Id: ddraw.CPP,v 1.10 1999-12-21 01:28:15 hugh Exp $ */ 2 3 /* 4 * DXDraw DLL implementaion 5 * 6 * Copyright 1998 Sander va Leeuwen 7 * Copyright 1999 Markus Montkowski 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 11 */ 12 1 13 #include <memory.h> 2 14 -
trunk/src/ddraw/divewrap.h
r522 r2174 1 /* $Id: divewrap.h,v 1.3 1999-12-21 01:28:18 hugh Exp $ */ 2 3 /* 4 * Wrapper for DIVE functions calls 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 1 11 2 12 -
trunk/src/ddraw/makefile
r1746 r2174 1 # 2 # PD-Win32 API 1 # $Id: makefile,v 1.16 1999-12-21 01:28:20 hugh Exp $ 3 2 # 4 3 # ddraw.dll makefile 4 # 5 # Copyright 1998 Sander van Leeuwen 6 # 1999 Markus Montkowski 7 # 8 # Project Odin Software License can be found in LICENSE.TXT 9 # 5 10 # 6 11 … … 20 25 OBJS = ddraw.obj os2ddraw.obj os2clipper.obj os2d3d.obj iccio1.obj asmutil.obj\ 21 26 os2surface.obj os2palette.obj os2palset.obj rectangle.obj initterm.obj \ 22 os2util.obj bltFunc.obj 27 os2util.obj bltFunc.obj fillfunc.obj colorconv.obj 23 28 24 29 25 LIBS = ..\..\lib\pmwinx.lib mmpm2.lib ..\..\lib\comctl32.lib $(PDWIN32_LIB)\advapi32.lib $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\gdi32.lib $(PDWIN32_LIB)\comctl32.lib $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O) 30 LIBS = $(PDWIN32_LIB)\pmwinx.lib $(PDWIN32_LIB)\advapi32.lib $(PDWIN32_LIB)\gdi32.lib \ 31 $(PDWIN32_LIB)\comctl32.lib $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\odincrt.lib \ 32 $(PDWIN32_LIB)\user32.lib mmpm2.lib OS2386.LIB $(RTLLIB_O) 26 33 27 34 all: $(TARGET).dll $(TARGET).lib … … 78 85 os2surface.h \ 79 86 os2ddraw.h\ 87 rectangle.h \ 80 88 $(PDWIN32_INCLUDE)\win\ddraw.h \ 81 89 $(PDWIN32_INCLUDE)\win\d3d.h 82 90 83 rectangle.obj: rectangle.cpp 91 rectangle.obj: rectangle.cpp rectangle.h 84 92 85 93 initterm.obj: initterm.cpp initterm.h … … 88 96 89 97 bltFunc.obj: bltFunc.cpp bltFunc.h \ 98 $(PDWIN32_INCLUDE)\misc.h 99 100 fillfunc.obj: fillfunc.cpp fillfunc.h \ 101 $(PDWIN32_INCLUDE)\misc.h 102 103 colorconv.obj: colorconv.cpp colorconv.h \ 90 104 $(PDWIN32_INCLUDE)\misc.h 91 105 -
trunk/src/ddraw/os2DDWindow.cpp
r522 r2174 1 /* $Id: os2DDWindow.cpp,v 1.4 1999-12-21 01:28:16 hugh Exp $ */ 2 3 /* 4 * Functions to subclass the games windowproc to be used for 5 * fullscreen switching 6 * 7 * Copyright 1999 Markus Montkowski 8 * 9 * Project Odin Software License can be found in LICENSE.TXT 10 * 11 */ 12 1 13 #define INCL_WIN 2 14 #include <os2wrap.h> … … 9 21 extern VOID SwitchDisplay(HWND hwnd); 10 22 11 ODINFUNCTION1(BOOL , OS2D dSubClassWindow ,HWND, hwndClient)23 ODINFUNCTION1(BOOL , OS2DDSubClassWindow ,HWND, hwndClient) 12 24 { 13 25 HWND hwndParent; -
trunk/src/ddraw/os2DDWindow.h
r211 r2174 1 /* $Id: os2DDWindow.h,v 1.2 1999-12-21 01:28:19 hugh Exp $ */ 2 3 /* 4 * Windwo subclass definitions 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 1 11 2 12 #ifndef OS2DDWindow -
trunk/src/ddraw/os2ddrawmodes.h
r211 r2174 1 /* $Id: os2ddrawmodes.h,v 1.2 1999-12-21 01:28:19 hugh Exp $ */ 2 3 /* 4 * Defintions of common videomodes we report back 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 1 11 #ifndef __OS2DDRAWMODES__ 2 12 #define __OS2DDRAWMODES__ -
trunk/src/ddraw/rectangle.cpp
r405 r2174 1 /* $Id: rectangle.cpp,v 1.3 1999-12-21 01:28:17 hugh Exp $ */ 2 3 /* 4 * Rectangle class Implementaion 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 11 12 typedef long BOOL; 13 1 14 #include "rectangle.h" 2 15 … … 13 26 } 14 27 15 IBase::BooleanDDRectangle::operator == ( const DDRectangle &aRect ) const28 BOOL DDRectangle::operator == ( const DDRectangle &aRect ) const 16 29 { 17 30 return ( lTop == aRect.lTop && lLeft == aRect.lLeft … … 19 32 lBottom == aRect.lBottom && lRight == aRect.lRight); 20 33 } 21 IBase::BooleanDDRectangle::operator != ( const DDRectangle& aRect ) const34 BOOL DDRectangle::operator != ( const DDRectangle& aRect ) const 22 35 { 23 36 return !( *this == aRect ); 24 37 } 25 IBase::BooleanDDRectangle::intersects ( const DDRectangle &aRect ) const38 BOOL DDRectangle::intersects ( const DDRectangle &aRect ) const 26 39 { 27 40 return ( lTop < aRect.lBottom && lLeft<aRect.lRight -
trunk/src/ddraw/rectangle.h
r405 r2174 1 /* $Id: rectangle.h,v 1.4 1999-12-21 01:28:19 hugh Exp $ */ 2 3 /* 4 * Rectangle class used to keep track of locked rects in surfaces 5 * 6 * Copyright 1999 Markus Montkowski 7 * 8 * Project Odin Software License can be found in LICENSE.TXT 9 * 10 */ 11 1 12 #ifndef __DDRectandle 2 13 #define __DDRectandle 3 14 4 #include <ibase.hpp> 5 6 class DDRectangle : public IBase { 7 typedef IBase 8 Inherited; 15 class DDRectangle { 9 16 public: 10 17 /*------------------------------ Related Types -------------------------------*/ … … 22 29 23 30 /*------------------------------- Comparisons --------------------------------*/ 24 B oolean31 BOOL 25 32 operator == ( const DDRectangle& rectangle ) const, 26 33 operator != ( const DDRectangle& rectangle ) const; 27 34 28 35 /*--------------------------------- Testing ----------------------------------*/ 29 B oolean36 BOOL 30 37 intersects ( const DDRectangle& rectangle ) const; 31 38
Note:
See TracChangeset
for help on using the changeset viewer.