Changeset 2174 for trunk/src


Ignore:
Timestamp:
Dec 21, 1999, 2:28:20 AM (26 years ago)
Author:
hugh
Message:

Added ODIn lic header with ID to all files where missing

Cleaned up Surface handling by movefing colorfill and
colorconversion into own files and use functionpointers
setup during creation.

updated makefile to add files

removed inhertiance from IBASE in DDrectangle class

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
    113#include <memory.h>
    214
  • 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 */
    111#ifndef __OS2CLIPPER_H__
    212#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
    112#include <memory.h>
    213
  • 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 */
    112#include <stdlib.h>
    213#include <string.h>
     
    14791490    dprintf(("DDRAW: SetCooperativeLevel: hwnd %X, Flags %X\n", hwndClient, dwFlags));
    14801491  #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  }
    14821499  me->hwndClient = hwndClient;
    14831500  #if 0
     
    15041521  me->screenheight = dwHeight;
    15051522  me->screenbpp    = dwBPP;
     1523
     1524  if(me->dwCoopMode & DDSCL_FULLSCREEN)
     1525  {
     1526    SetWindowPos(me->hwndClient, HWND_TOP,0,0,dwWidth,dwHeight,0);
     1527  }
    15061528
    15071529  memset(&sBlt,0,sizeof(sBlt));
     
    15421564  me->screenbpp    = dwBPP;
    15431565
     1566  if(me->dwCoopMode & DDSCL_FULLSCREEN)
     1567  {
     1568    SetWindowPos(me->hwndClient, HWND_TOP,0,0,dwWidth,dwHeight,0);
     1569  }
     1570
    15441571  memset(&sBlt,0,sizeof(sBlt));
    15451572  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
    113#ifndef __OS2DDRAW_HPP__
    214  #define __OS2DDRAW_HPP__
     
    6779    char   *pFrameBuffer;
    6880    HWND    hwndClient;
     81    DWORD   dwCoopMode;
    6982    int     screenwidth, screenheight, screenbpp;
    7083    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
    113#include <stdio.h>
    214#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
    113#ifndef __OS2PALETTE_H__
    214#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 */
    111#define INCL_GREALL
    212#define INCL_GPI
     
    1828 int  i;
    1929
    20  
     30
    2131
    2232  hps = WinGetPS(HWND_DESKTOP);
     
    4555  WinReleasePS(hps);
    4656
    47  
     57
    4858
    4959}
     
    5565 HDC hdc;
    5666
    57  
     67
    5868
    5969  hps = WinGetPS( HWND_DESKTOP);
     
    7181  WinReleasePS(hps);
    7282
    73  
     83
    7484
    7585}
  • 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 */
    111#ifndef __OS2PALSET_H__
    2 #define __OS2PALSET_H__
     12  #define __OS2PALSET_H__
    313
    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
    1223
    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();
    1627
    1728#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
    112#include <stdlib.h>
    213#include <string.h>
     
    1728#include "asmutil.h"
    1829#include "bltFunc.h"
     30#include "colorconv.h"
     31#include "fillfunc.h"
    1932#include <winerror.h>
    2033#include <os2win.h>
     
    284297
    285298WORD wDefaultPalete16[256];
     299DWORD dwDefaultPalete24[256];
    286300BOOL fPalInit=FALSE;
    287301
     
    730744      {
    731745        case 8:
    732           BltSolid = &BltSolid8to8;
     746          BltSolid  = &BltSolid8to8;
     747          ColorConv = NULL;
     748          ColorFill = &Fill8on8;
    733749          break;
    734750        case 16:
    735           BltSolid = &BltSolid8to16;
     751          BltSolid  = &BltSolid8to16;
     752          ColorConv = &Conv8to16;
     753          ColorFill = &Fill8on16;
    736754          break;
    737755        case 24:
    738           BltSolid = &BltSolid8to24;
     756          BltSolid  = &BltSolid8to24;
     757          ColorConv = &Conv8to24;
     758          ColorFill = &Fill8on24;
    739759          break;
    740760        case 32:
    741           BltSolid = &BltSolid8to32;
     761          BltSolid  = &BltSolid8to32;
     762          ColorConv = &Conv8to32;
     763          ColorFill = &Fill8on32;
    742764          break;
    743765        default:
    744766          dprintf(("DDRAW: Unsupported System ColorDeapth %d",lpDraw->dCaps.ulDepth));
    745           BltSolid = NULL;
     767          BltSolid  = NULL;
     768          ColorConv = NULL;
     769          ColorFill = NULL;
    746770          break;
    747771      }
    748772      break;
    749     case16:
     773    case 16:
    750774      switch(lpDraw->dCaps.ulDepth)
    751775      {
    752776        case 8:
    753777          BltSolid = &BltSolid16to8;
     778          ColorConv = &Conv16to8;
     779          ColorFill = &Fill16on8;
    754780          break;
    755781        case 16:
    756           BltSolid = &BltSolid16to16;
     782          BltSolid  = &BltSolid16to16;
     783          ColorConv = NULL;
     784          ColorFill = &Fill16on16;
    757785          break;
    758786        case 24:
    759           BltSolid = &BltSolid16to24;
     787          BltSolid  = &BltSolid16to24;
     788          ColorConv = &Conv16to24;
     789          ColorFill = &Fill16on24;
    760790          break;
    761791        case 32:
    762           BltSolid = &BltSolid16to32;
     792          BltSolid  = &BltSolid16to32;
     793          ColorConv = &Conv16to32;
     794          ColorFill = &Fill16on32;
    763795          break;
    764796        default:
    765797          dprintf(("DDRAW: Unsupported System ColorDeapth %d",lpDraw->dCaps.ulDepth));
    766           BltSolid = NULL;
     798          BltSolid  = NULL;
     799          ColorConv = NULL;
     800          ColorFill = NULL;
    767801          break;
    768802      }
    769803      break;
    770     case24:
     804    case 24:
    771805      switch(lpDraw->dCaps.ulDepth)
    772806      {
    773807        case 8:
    774           BltSolid = &BltSolid24to8;
     808          BltSolid  = &BltSolid24to8;
     809          ColorConv = &Conv24to8;
     810          ColorFill = &Fill24on8;
    775811          break;
    776812        case 16:
    777           BltSolid = &BltSolid24to16;
     813          BltSolid  = &BltSolid24to16;
     814          ColorConv = &Conv24to16;
     815          ColorFill = &Fill24on16;
    778816          break;
    779817        case 24:
    780           BltSolid = &BltSolid24to24;
     818          BltSolid  = &BltSolid24to24;
     819          ColorConv = NULL;
     820          ColorFill = &Fill24on24;
    781821          break;
    782822        case 32:
    783           BltSolid = &BltSolid24to32;
     823          BltSolid  = &BltSolid24to32;
     824          ColorConv = &Conv24to32;
     825          ColorFill = &Fill24on32;
    784826          break;
    785827        default:
    786828          dprintf(("DDRAW: Unsupported System ColorDeapth %d",lpDraw->dCaps.ulDepth));
    787           BltSolid = NULL;
     829          BltSolid  = NULL;
     830          ColorConv = NULL;
     831          ColorFill = NULL;
    788832          break;
    789833      }
    790834      break;
    791     case32:
     835    case 32:
    792836      switch(lpDraw->dCaps.ulDepth)
    793837      {
    794838        case 8:
    795           BltSolid = &BltSolid32to8;
     839          BltSolid  = &BltSolid32to8;
     840          ColorConv = &Conv32to8;
     841          ColorFill = &Fill32on8;
    796842          break;
    797843        case 16:
    798           BltSolid = &BltSolid32to16;
     844          BltSolid  = &BltSolid32to16;
     845          ColorConv = &Conv32to16;
     846          ColorFill = &Fill32on16;
    799847          break;
    800848        case 24:
    801           BltSolid = &BltSolid32to24;
     849          BltSolid  = &BltSolid32to24;
     850          ColorConv = &Conv32to24;
     851          ColorFill = &Fill32on24;
    802852          break;
    803853        case 32:
    804           BltSolid = &BltSolid32to32;
     854          BltSolid  = &BltSolid32to32;
     855          ColorConv = NULL;
     856          ColorFill = &Fill32on32;
    805857          break;
    806858        default:
    807859          dprintf(("DDRAW: Unsupported System ColorDeapth %d",lpDraw->dCaps.ulDepth));
    808           BltSolid = NULL;
     860          BltSolid  = NULL;
     861          ColorConv = NULL;
     862          ColorFill = NULL;
    809863          break;
    810864      }
     
    812866    default:
    813867      dprintf(("DDRAW: Unsupported DX ColorDeapth %d",lpDraw->GetScreenBpp()));
    814       BltSolid = NULL;
     868      BltSolid  = NULL;
     869      ColorConv = NULL;
     870      ColorFill = NULL;
    815871      break;
    816872  }
     
    14021458//******************************************************************************
    14031459//******************************************************************************
    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;
     1460HRESULT 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;
    14111467  DWORD *pPal24;
    14121468  WORD  *pPal16;
     
    14211477    FillWidth  = lpDestRect->right - lpDestRect->left;
    14221478    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;
    14261481  }
    14271482  else
    14281483  {
    14291484    dprintf(("DDRAW: Fill all at addr "));
     1485    Top = 0;
     1486    Left = 0;
    14301487    FillWidth  = width;
    14311488    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));
    14351492
    14361493  // Better safe then sorry
     
    14501507                                ((DefaultPalette[i*3+1]>>2) <<5) +
    14511508                                ((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);
    14521512          dprintf(( " # %d : RGB=%02X/%02X/%02X => %04X\n",
    14531513                    i,
     
    14631523      }
    14641524      pPal16 = &wDefaultPalete16[0];
     1525      pPal24 = &dwDefaultPalete24[0];
    14651526    }
    14661527    else
     
    14711532  }
    14721533
     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/*
    14731543  switch(dwBytesPPDive)
    14741544  {
     
    16341704    }
    16351705  }
    1636 
     1706*/
    16371707  return(DD_OK);
    16381708}
     
    16411711void OS2IDirectDrawSurface::ColorConversion(LPRECT lpRect)
    16421712{
    1643   char *pSrc,*pDst,*pSLine,*pDLine;
     1713  //char *pSrc,*pDst,*pSLine,*pDLine;
    16441714  DWORD CCwidth,CCheight,x,y;
    16451715  DWORD *pPal24;
     
    16561726                                ((DefaultPalette[i*3+1]>>2) <<5) +
    16571727                                ((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);
    16581731        dprintf(( " # %d : RGB=%02X/%02X/%02X => %04X\n",
    16591732                  i,
     
    16691742    }
    16701743    pPal16 = &wDefaultPalete16[0];
     1744    pPal24 = &dwDefaultPalete24[0];
    16711745  }
    16721746  else
     
    16781752  if(NULL==lpRect)
    16791753  {
    1680     pSrc = pFrameBuffer;
    1681     pDst = pDiveBuffer;
     1754    //pSrc = pFrameBuffer;
     1755    //pDst = pDiveBuffer;
    16821756    CCwidth  = width;
    16831757    CCheight = height;
     1758    x = 0;
     1759    y = 0;
    16841760  }
    16851761  else
     
    16911767    lpRect->bottom = y;
    16921768    // end of hack
     1769  #if 0
    16931770    pSrc = pFrameBuffer +
    16941771           (lpRect->top * dwPitchFB) +
     
    16971774           (lpRect->top * dwPitchDB) +
    16981775           (lpRect->left* dwBytesPPDive);
     1776  #endif
     1777    y = lpRect->top;
     1778    x = lpRect->left;
    16991779    CCwidth  = lpRect->right - lpRect->left;
    17001780    CCheight = lpRect->bottom - lpRect->top;
     
    17021782  }
    17031783
    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/*
    17071796  pSLine = pSrc;
    17081797  pDLine = pDst;
     
    17391828      {
    17401829        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        }
    17411841      }
    17421842      else
     
    17491849      {
    17501850        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        }
    17511861      }
    17521862      else
     
    17621872      break;
    17631873  }
    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   else
    1782   {
    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));
    18351874*/
    18361875}
     
    24882527      return DDERR_INVALIDPARAMS;
    24892528
    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);
    24942530
    24952531    return(DD_OK); // according to the M$ DDK only one flag shall/can be set.
     
    25302566        {
    25312567          // ToDo: Realy implement code to get the correct index for black in 8 Bitmode
    2532           dest->ColorFill(lpDestRect, 0 );
     2568          dest->DoColorFill(lpDestRect, 0 );
    25332569        }
    25342570        else
    2535           dest->ColorFill(lpDestRect, 0);
     2571          dest->DoColorFill(lpDestRect, 0);
    25362572        return DD_OK;
    25372573      }
     
    25412577        if(1==dest->dwBytesPPDive)
    25422578        {
    2543           // ToDo: Realy implement code to get the correct index for black in 8 Bitmode
    2544           dest->ColorFill(lpDestRect, 0xFFFFFFFF );
     2579          // ToDo: Realy implement code to get the correct index for white in 8 Bitmode
     2580          dest->DoColorFill(lpDestRect, 0xFFFFFFFF );
    25452581        }
    25462582        else
    2547           dest->ColorFill(lpDestRect, 0xFFFFFFFF);
    2548         return DD_OK;
     2583          dest->DoColorFill(lpDestRect, 0xFFFFFFFF);
     2584        return (DD_OK);
    25492585      }
    25502586
  • 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
    112#ifndef __OS2SURFACE_H__
    213#define __OS2SURFACE_H__
     
    5263
    5364 private:
    54         HRESULT         ColorFill(LPRECT, DWORD);
     65        HRESULT         DoColorFill(LPRECT, DWORD);
    5566        void (__cdecl *BltSolid)( char *pDBDst,
    5667                                char *pFBDst,
     
    6879                                DWORD dwPitchFBSrc
    6980                               );
     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                                 );
    70102 protected:
    71103        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;
    14; asmutil.asm Color key bit blitting for DirectDraw
    25;
    36; Copyright 1998 Sander van Leeuwen
    47;           1999 Markus Montkowski
     8;
     9; Project Odin Software License can be found in LICENSE.TXT
     10;
    511
    612                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
    13/*
    24 * asmutil.asm function definition
     
    46 * Copyright 1998 Sander van Leeuwen
    57 *           1999 Markus Montkowski
     8 *
     9 * Project Odin Software License can be found in LICENSE.TXT
     10 *
    611 */
    712
  • 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
    112#include <memory.h>
    213#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 */
    111
    212
  • 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
    113#include <memory.h>
    214
  • 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 */
    111
    212
  • 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 $
    32#
    43# 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#
    510#
    611
     
    2025OBJS =  ddraw.obj os2ddraw.obj os2clipper.obj os2d3d.obj iccio1.obj asmutil.obj\
    2126        os2surface.obj os2palette.obj os2palset.obj rectangle.obj initterm.obj \
    22         os2util.obj bltFunc.obj
     27        os2util.obj bltFunc.obj fillfunc.obj colorconv.obj
    2328
    2429
    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)
     30LIBS =  $(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)
    2633
    2734all: $(TARGET).dll $(TARGET).lib
     
    7885    os2surface.h \
    7986    os2ddraw.h\
     87    rectangle.h \
    8088    $(PDWIN32_INCLUDE)\win\ddraw.h \
    8189    $(PDWIN32_INCLUDE)\win\d3d.h
    8290
    83 rectangle.obj: rectangle.cpp
     91rectangle.obj: rectangle.cpp rectangle.h
    8492
    8593initterm.obj: initterm.cpp initterm.h
     
    8896
    8997bltFunc.obj: bltFunc.cpp bltFunc.h \
     98    $(PDWIN32_INCLUDE)\misc.h
     99
     100fillfunc.obj: fillfunc.cpp fillfunc.h \
     101    $(PDWIN32_INCLUDE)\misc.h
     102
     103colorconv.obj: colorconv.cpp colorconv.h \
    90104    $(PDWIN32_INCLUDE)\misc.h
    91105
  • 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
    113#define INCL_WIN
    214#include <os2wrap.h>
     
    921extern VOID SwitchDisplay(HWND hwnd);
    1022
    11 ODINFUNCTION1(BOOL , OS2DdSubClassWindow ,HWND, hwndClient)
     23ODINFUNCTION1(BOOL , OS2DDSubClassWindow ,HWND, hwndClient)
    1224{
    1325  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 */
    111
    212#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 */
    111#ifndef __OS2DDRAWMODES__
    212#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
     12typedef long BOOL;
     13
    114#include "rectangle.h"
    215
     
    1326}
    1427
    15 IBase::Boolean DDRectangle::operator == ( const DDRectangle &aRect ) const
     28BOOL DDRectangle::operator == ( const DDRectangle &aRect ) const
    1629  {
    1730  return ( lTop == aRect.lTop && lLeft == aRect.lLeft
     
    1932           lBottom == aRect.lBottom && lRight == aRect.lRight);
    2033  }
    21 IBase::Boolean DDRectangle::operator != ( const DDRectangle& aRect ) const
     34BOOL DDRectangle::operator != ( const DDRectangle& aRect ) const
    2235  {
    2336  return !( *this == aRect );
    2437  }
    25 IBase::Boolean DDRectangle::intersects ( const DDRectangle &aRect ) const
     38BOOL DDRectangle::intersects ( const DDRectangle &aRect ) const
    2639{
    2740  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
    112#ifndef __DDRectandle
    213  #define __DDRectandle
    314
    4 #include <ibase.hpp>
    5 
    6 class DDRectangle : public IBase {
    7 typedef IBase
    8   Inherited;
     15class DDRectangle {
    916public:
    1017/*------------------------------ Related Types -------------------------------*/
     
    2229
    2330/*------------------------------- Comparisons --------------------------------*/
    24 Boolean
     31BOOL
    2532  operator == ( const DDRectangle& rectangle ) const,
    2633  operator != ( const DDRectangle& rectangle ) const;
    2734
    2835/*--------------------------------- Testing ----------------------------------*/
    29 Boolean
     36BOOL
    3037  intersects ( const DDRectangle& rectangle ) const;
    3138
Note: See TracChangeset for help on using the changeset viewer.