| Operations |
| AddSurfaceToList | This call adds a surface to the internal surfaces list this list can be used to determine if there are any unfreed surfaces when the app exits or for other purposes. |
| CheckIfVideoModeExists | Checks if the desired video mode exists, if yes return = true , else return = false. |
| CreateBackBufferInVRAM | |
| CreateFullScreen | Creates the DirectDraw object, sets the screen resolution and creates and attaches the front and back buffer. |
| CreateWindowed | Creates the DirectDraw object, initialises CDX for a windowed mode application. |
| FadeIn | NAME: FadeIn. |
| FadeOut | NAME: FadeOut. |
| FadeTo | NAME: FadeTo. |
| FadeToBlack | NAME: FadeToBlack. |
| FadeToSource | NAME: FadeToSource. |
| Fill | Fills the back buffer with the specified colour. |
| FillPalette | Sets all the palette entries to a single colour. |
| Flip | Displays the contents of the back buffer on screen. |
| GetBPP | |
| GetBack | |
| GetColor | Returns the red, green and blue values of a single colour in the current palette. |
| GetDD | |
| GetFront | |
| GetHeight | |
| GetNumberOfVideoModes | Gets the numer of video modes the card supports this function is needed if you need a list of all videomodes to know how much modes there are and to get them via GetVideoModeInformation. |
| GetPalette | |
| GetPalette | Fills lpPE with values from the current palette. |
| GetTripleBuffering | |
| GetVideoModeInformation | Gets information about Videomode Index, Index is a number from 0 to GetNumberOfVideoModes if an invalid mode index is given, the return value is false, else true. |
| GetWidth | |
| GreyScale | Converts the current palette into a monochrome palette. |
| InitCDXScreen | Initializes all member variables an enumerates video modes is called from all constructors! |
| LoadBitmapA | Loads a . |
| LoadPalette | Loads the palette from a . |
| MakeColor | -------------------------------------------------------------------------------- Converts the Color into a Color suitable for the selected color format Color=8-Bit red,gree,blue as the RGB macro. |
| ReleaseAllSurfaces | This call removes all surfaces from the SurfaceList, it is usually called from CDXScreen destructor, the surfaces are also destroyed! |
| ReleaseSurfaceFromList | This call removes the surface from the SurfaceList, it is not destroyed. |
| Restore | NAME: Restore. |
| SelectDriver | Selects Display Driver and recreates the direct draw interface. |
| SetColor | Sets the red, green and blue values of a single colour in the current palette. |
| SetPalette | Sets the palette pointed to by lpPE. |
| SetTripleBuffering | |
| SetVideoMode | -------------------------------------------------------------------------------- Sets the current video mode, if BPP = 0 then a windowed mode is set --------------------------------------------------------------------------------. |
| WaitForVerticalBlank | Waits until the vertical blank phase starts. |
| EnumDrivers | Enumerates all Display Drivers. |
| EnumVideoModes | Enumerates all Video Modes. |
| | |
| Data Members | |
| public |
| DWORD m_BPP; | Bits per pixel (colour depth). |
| BOOL m_BackBufferInVRAM; | |
| CDX_DRIVERSTRUCT* m_Drivers; | Linked list with grafikcard informations. |
| DWORD m_NumberOfDrivers; | Std::vector<CDXSurface *> SurfaceList; // list which holds every created surface Janni number of grafikcards installed. |
| DWORD m_NumberOfVideoModes; | Janni number of video modes the video adapter supports. |
| DWORD m_SelectedDriver; | Which driver will be used for creating DirectDraw. |
| BOOL m_TripleBuffering; | Is triple buffering enabled ? |
| CDX_VIDEOMODESSTRUCT* m_VideoModes; | Linked list with all video modes informations. |
| LPDIRECTDRAWSURFACE4 m_ZBuffer; | |
| BOOL m_bFullScreen; | Is the program running in fullscreen mode? |
| DWORD m_dwPixelHeight; | The screen height, in pixels. |
| DWORD m_dwPixelWidth; | The screen width, in pixels. |
| void* m_hWnd; | Pointer to the HWND handle of the window. |
| LPDIRECTDRAWCLIPPER m_lpClipper; | The DirectDraw clipper, used for window mode only. |
| LPDIRECTDRAW4 m_lpDD; | The DirectDraw object. |
| LPDIRECTDRAWPALETTE m_lpDDPalette; | The DirectDraw palette object. |
| CDXSurface* m_lpDDSBack; | A CDXSurface object for the back buffer. |
| CDXSurface* m_lpDDSFront; | A CDXSurface object for the front buffer. |
| private |
| DWORD m_accumulatedFrameTime; | |
| LONG m_fps; | |
| DWORD m_frameCount; | |
| DWORD m_frameStartTime; | |