|
coastline 0.0.4
|
The helpers of DirectDraw that load bitmaps into surfaces, match colours to the pixels of a surface, and set colour keys. More...

Go to the source code of this file.
Functions | |
| IDirectDrawSurface * | DDLoadBitmap (IDirectDraw2 *pDirectDraw, LPCSTR pszBitmap, int nWidth, int nHeight, DDSURFACEDESC *pDesc) |
| Create an off-screen surface and copy a bitmap into it. | |
| HRESULT | DDReLoadBitmap (IDirectDrawSurface *pSurface, LPCSTR pszBitmap) |
| Copy a bitmap into a surface again, as after the surface is restored. | |
| HRESULT | DDCopyBitmap (IDirectDrawSurface *pSurface, HBITMAP hBitmap, int x, int y, int nWidth, int nHeight) |
| Restore a surface and stretch a part of a bitmap over all of it. | |
| DWORD | DDColorMatch (IDirectDrawSurface *pSurface, COLORREF color) |
| Find the pixel value of a surface for a colour, by drawing the colour at the top left of the surface and reading the pixel back. | |
| HRESULT | DDSetColorKey (IDirectDrawSurface *pSurface, COLORREF color) |
| Make a colour the source colour key of a surface. | |
The helpers of DirectDraw that load bitmaps into surfaces, match colours to the pixels of a surface, and set colour keys.
| IDirectDrawSurface * DDLoadBitmap | ( | IDirectDraw2 * | pDirectDraw, |
| LPCSTR | pszBitmap, | ||
| int | nWidth, | ||
| int | nHeight, | ||
| DDSURFACEDESC * | pDesc ) |
Create an off-screen surface and copy a bitmap into it.
The bitmap is a resource of the game, or failing that a file.
| pDirectDraw | The DirectDraw interface that creates the surface. |
| pszBitmap | The name of the resource or the path of the file. |
| nWidth | The width to load the bitmap at, or 0 for its own. |
| nHeight | The height to load the bitmap at, or 0 for its own. |
| pDesc | Receives the description the surface was created with. It must not be null. |
| HRESULT DDReLoadBitmap | ( | IDirectDrawSurface * | pSurface, |
| LPCSTR | pszBitmap ) |
Copy a bitmap into a surface again, as after the surface is restored.
| pSurface | The surface. |
| pszBitmap | The name of the resource or the path of the file. |
| HRESULT DDCopyBitmap | ( | IDirectDrawSurface * | pSurface, |
| HBITMAP | hBitmap, | ||
| int | x, | ||
| int | y, | ||
| int | nWidth, | ||
| int | nHeight ) |
Restore a surface and stretch a part of a bitmap over all of it.
| pSurface | The surface. |
| hBitmap | The bitmap. |
| x | The left of the part. |
| y | The top of the part. |
| nWidth | The width of the part, or 0 for the width of the bitmap. |
| nHeight | The height of the part, or 0 for the height of the bitmap. |
| DWORD DDColorMatch | ( | IDirectDrawSurface * | pSurface, |
| COLORREF | color ) |
Find the pixel value of a surface for a colour, by drawing the colour at the top left of the surface and reading the pixel back.
| pSurface | The surface. |
| color | The colour, or CLR_INVALID to read the pixel as it is. |
| HRESULT DDSetColorKey | ( | IDirectDrawSurface * | pSurface, |
| COLORREF | color ) |
Make a colour the source colour key of a surface.
| pSurface | The surface. |
| color | The colour. |