openMSX
|
Utility class for converting VRAM contents to host pixels. More...
#include <CharacterConverter.hh>
Public Member Functions | |
CharacterConverter (VDP &vdp, std::span< const Pixel, 16 > palFg, std::span< const Pixel, 16 > palBg) | |
Create a new bitmap scanline converter. More... | |
void | convertLine (std::span< Pixel > buf, int line) |
Convert a line of V9938 VRAM to 256 or 512 host pixels. More... | |
void | setDisplayMode (DisplayMode mode) |
Select the display mode to use for scanline conversion. More... | |
Utility class for converting VRAM contents to host pixels.
Definition at line 18 of file CharacterConverter.hh.
openmsx::CharacterConverter< Pixel >::CharacterConverter | ( | VDP & | vdp, |
std::span< const Pixel, 16 > | palFg, | ||
std::span< const Pixel, 16 > | palBg | ||
) |
Create a new bitmap scanline converter.
vdp | The VDP of which the VRAM will be converted. |
palFg | Pointer to 16-entries array that specifies VDP foreground color index to host pixel mapping. This is kept as a pointer, so any changes to the palette are immediately picked up by convertLine. |
palBg | Pointer to 16-entries array that specifies VDP background color index to host pixel mapping. This is kept as a pointer, so any changes to the palette are immediately picked up by convertLine. |
Definition at line 26 of file CharacterConverter.cc.
void openmsx::CharacterConverter< Pixel >::convertLine | ( | std::span< Pixel > | buf, |
int | line | ||
) |
Convert a line of V9938 VRAM to 256 or 512 host pixels.
Call this method in non-planar display modes (Graphic4 and Graphic5).
buf | Buffer where host pixels will be written to. Depending on the screen mode, the buffer must contain at least 256 or 512 pixels, but more is allowed (the extra pixels aren't touched). |
line | Display line number [0..255]. |
Definition at line 40 of file CharacterConverter.cc.
References openmsx::DisplayMode::GRAPHIC1, openmsx::DisplayMode::GRAPHIC2, openmsx::DisplayMode::GRAPHIC3, openmsx::DisplayMode::MULTICOLOR, openmsx::DisplayMode::MULTIQ, openmsx::DisplayMode::TEXT1, openmsx::DisplayMode::TEXT1Q, and openmsx::DisplayMode::TEXT2.
void openmsx::CharacterConverter< Pixel >::setDisplayMode | ( | DisplayMode | mode | ) |
Select the display mode to use for scanline conversion.
mode | The new display mode. |
Definition at line 33 of file CharacterConverter.cc.
References openmsx::DisplayMode::getBase().