The images of 16-bit RGB 565 pixels the Glide renderer loads from bitmaps and copies to the frame buffer, with a colour key.
More...
#include <stdint.h>
#include <windows.h>
Go to the source code of this file.
|
| typedef struct Rgb565Image | Rgb565Image |
| | A bitmap of RGB 565 pixels with a transparent colour key.
|
|
| Rgb565Image * | CreateRgb565Image (int width, int height) |
| | Allocate an RGB 565 image and an uninitialised pixel buffer.
|
| void | FreeRgb565Image (Rgb565Image *image) |
| | Free image and its pixel buffer, accepting NULL.
|
| void | ConvertBgr24ToRgb565FlipVertical (uint16_t *destination, const uint8_t *source, int width, int height, int sourceStride) |
| | Convert 24-bit BGR rows to RGB 565 while reversing their vertical order.
|
| Rgb565Image * | CreateRgb565ImageFromBitmap (const BITMAP *bitmap) |
| | Convert a 24-bit Windows bitmap to an RGB 565 image.
|
| Rgb565Image * | LoadBitmapToRgb565Image (const char *name, int width, int height) |
| | Load a bitmap resource or file at the requested dimensions and convert it to RGB 565.
|
| void | BlitRgb565ImageRegion (Rgb565Image *destination, unsigned x, unsigned y, const Rgb565Image *source, const RECT *rect, DWORD flags) |
| | Copy a rectangle of an image into another at a position, clipped to the right and bottom edges of the destination.
|
| void | CopyRgb565Rect (void *destination, int destinationStride, unsigned width, int height, const void *source, int sourceStride) |
| | Copy RGB 565 rows without clipping or interpreting colour keys.
|
| void | CopyRgb565RectColorKeyed (uint16_t *destination, int destinationStride, int width, int height, const uint16_t *source, int sourceStride, uint16_t colorKey) |
| | Copy RGB 565 rows, omitting source pixels equal to colorKey.
|
| void | SetRgb565ImageColorKey (Rgb565Image *image, COLORREF color) |
| | Convert a Windows RGB colour to the image's RGB 565 transparency key.
|
| void | WriteRgb565ImageToGlideLfb (const Rgb565Image *image) |
| | Write an image to the back buffer of Glide at its top left.
|
The images of 16-bit RGB 565 pixels the Glide renderer loads from bitmaps and copies to the frame buffer, with a colour key.
◆ RGB565_BLIT_COLOR_KEYED
| #define RGB565_BLIT_COLOR_KEYED 0x1 |
◆ Rgb565Image
| typedef struct Rgb565Image Rgb565Image |
A bitmap of RGB 565 pixels with a transparent colour key.
◆ CreateRgb565Image()
| Rgb565Image * CreateRgb565Image |
( |
int | width, |
|
|
int | height ) |
Allocate an RGB 565 image and an uninitialised pixel buffer.
- Returns
- The image, or NULL when allocation fails.
- Ghidra address:
- BRGlide: 0x10001130
◆ FreeRgb565Image()
Free image and its pixel buffer, accepting NULL.
- Ghidra address:
- BRGlide: 0x10001190
◆ ConvertBgr24ToRgb565FlipVertical()
| void ConvertBgr24ToRgb565FlipVertical |
( |
uint16_t * | destination, |
|
|
const uint8_t * | source, |
|
|
int | width, |
|
|
int | height, |
|
|
int | sourceStride ) |
Convert 24-bit BGR rows to RGB 565 while reversing their vertical order.
- Parameters
-
| destination | Output pixels, with no row padding. |
| source | Input bitmap pixels. |
| width | Pixels per row. |
| height | Number of rows. |
| sourceStride | Bytes between source rows. |
- Ghidra address:
- BRGlide: 0x100011c0
◆ CreateRgb565ImageFromBitmap()
Convert a 24-bit Windows bitmap to an RGB 565 image.
- Returns
- The image, or NULL for another bit depth or failed allocation.
- Ghidra address:
- BRGlide: 0x10001240
◆ LoadBitmapToRgb565Image()
| Rgb565Image * LoadBitmapToRgb565Image |
( |
const char * | name, |
|
|
int | width, |
|
|
int | height ) |
Load a bitmap resource or file at the requested dimensions and convert it to RGB 565.
- Returns
- The image with a green colour key, or NULL when loading or conversion fails.
- Ghidra address:
- BRGlide: 0x10001290
◆ BlitRgb565ImageRegion()
Copy a rectangle of an image into another at a position, clipped to the right and bottom edges of the destination.
- Parameters
-
| destination | The image copied into. |
| x | The left of the copy in the destination. |
| y | The top of the copy in the destination. |
| source | The image copied from. |
| rect | The rectangle of the source. |
| flags | RGB565_BLIT_COLOR_KEYED or 0. |
- Ghidra address:
- BRGlide: 0x10001320
◆ CopyRgb565Rect()
| void CopyRgb565Rect |
( |
void * | destination, |
|
|
int | destinationStride, |
|
|
unsigned | width, |
|
|
int | height, |
|
|
const void * | source, |
|
|
int | sourceStride ) |
Copy RGB 565 rows without clipping or interpreting colour keys.
- Parameters
-
| destination | Output pixels. |
| destinationStride | Bytes between destination rows. |
| width | Pixels per row. |
| height | Number of rows. |
| source | Input pixels. |
| sourceStride | Bytes between source rows. |
- Ghidra address:
- BRGlide: 0x100013f0
◆ CopyRgb565RectColorKeyed()
| void CopyRgb565RectColorKeyed |
( |
uint16_t * | destination, |
|
|
int | destinationStride, |
|
|
int | width, |
|
|
int | height, |
|
|
const uint16_t * | source, |
|
|
int | sourceStride, |
|
|
uint16_t | colorKey ) |
Copy RGB 565 rows, omitting source pixels equal to colorKey.
- Parameters
-
| destination | Output pixels. |
| destinationStride | Bytes between destination rows. |
| width | Pixels per row. |
| height | Number of rows. |
| source | Input pixels. |
| sourceStride | Bytes between source rows. |
| colorKey | Source pixel value to omit. |
- Ghidra address:
- BRGlide: 0x10001440
◆ SetRgb565ImageColorKey()
Convert a Windows RGB colour to the image's RGB 565 transparency key.
- Ghidra address:
- BRGlide: 0x100014a0
◆ WriteRgb565ImageToGlideLfb()
| void WriteRgb565ImageToGlideLfb |
( |
const Rgb565Image * | image | ) |
|
Write an image to the back buffer of Glide at its top left.
- Parameters
-
| image | The image, its pixels in RGB 565. |
- Ghidra address:
- BRGlide: 0x100014e0