| Line |  | 
|---|
| 1 |  | 
|---|
| 2 | class OS2IDirectDraw | 
|---|
| 3 | { | 
|---|
| 4 | public: | 
|---|
| 5 | //this one has to go first! | 
|---|
| 6 | IDirectDraw4Vtbl *lpVtbl; | 
|---|
| 7 | IDirectDraw2Vtbl  Vtbl; | 
|---|
| 8 | // MS did it again with direct/X 6 they changed the behavior of the directdraw component | 
|---|
| 9 | // So we now need 2 Virt. Tables one for the old and one for the new so we return the | 
|---|
| 10 | // right interface if one creates a DX6 directdraw object but wants a DX2,3,5 interface | 
|---|
| 11 | IDirectDraw4Vtbl  Vtbl4; | 
|---|
| 12 | IDirect3DVtbl     Vtbl3D; | 
|---|
| 13 |  | 
|---|
| 14 | OS2IDirectDraw( GUID *lpGUID); | 
|---|
| 15 | ~OS2IDirectDraw(); | 
|---|
| 16 |  | 
|---|
| 17 | // Simple management for Surfaces should be good enougth for now | 
|---|
| 18 | inline  BOOL          HasPrimarySurface() { return PrimaryExists;} | 
|---|
| 19 | void          SetPrimarySurface(BOOL NewStatus){PrimaryExists = NewStatus;} | 
|---|
| 20 | int           Referenced; | 
|---|
| 21 | inline  HRESULT       GetLastError()    { return lastError;    } | 
|---|
| 22 | inline  char *        GetFrameBuffer()  { return pFrameBuffer; } | 
|---|
| 23 | inline  int           GetScreenWidth()  { return screenwidth;  } | 
|---|
| 24 | inline  int           GetScreenHeight() { return screenheight; } | 
|---|
| 25 | inline  int           GetScreenBpp()    { return screenbpp;} | 
|---|
| 26 | inline  FOURCC        GetScreenFourCC() { return SupportedFourCCs[screenbpp>>3];} | 
|---|
| 27 |  | 
|---|
| 28 | protected: | 
|---|
| 29 | HRESULT lastError; | 
|---|
| 30 | FOURCC  SupportedFourCCs[] = {FOURCC_LUT8,FOURCC_R565,FOURCC_RGB3,FOURCC_RGB4}; | 
|---|
| 31 |  | 
|---|
| 32 | char   *pFrameBuffer; | 
|---|
| 33 | HWND    hwndClient; | 
|---|
| 34 | int     screenwidth, screenheight, screenbpp; | 
|---|
| 35 | BOOL    PrimaryExists; | 
|---|
| 36 |  | 
|---|
| 37 | // Linked list management | 
|---|
| 38 | OS2IDirectDraw* next;                   // Next OS2IDirectDraw | 
|---|
| 39 | static    OS2IDirectDraw* ddraw;                  // List of OS2IDirectDraw | 
|---|
| 40 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.