Public Member Functions | |
DisplayMan (LabEngine *lab) | |
void | loadPict (const Common::String filename) |
void | loadBackPict (const Common::String fileName, uint16 *highPal) |
void | readPict (const Common::String filename, bool playOnce=true, bool onlyDiffData=false, byte *memoryBuffer=nullptr) |
void | freePict () |
void | doTransition (TransitionType transitionType, const Common::String filename) |
void | blackScreen () |
void | whiteScreen () |
void | blackAllScreen () |
void | drawPanel () |
void | setUpScreens () |
int | longDrawMessage (Common::String str, bool isActionMessage) |
void | drawMessage (Common::String str, bool isActionMessage) |
void | setActionMessage (bool val) |
void | rectFill (uint16 x1, uint16 y1, uint16 x2, uint16 y2, byte color) |
void | rectFill (Common::Rect fillRect, byte color) |
void | rectFillScaled (uint16 x1, uint16 y1, uint16 x2, uint16 y2, byte color) |
int | flowText (TextFont *font, int16 spacing, byte penColor, byte backPen, bool fillBack, bool centerh, bool centerv, bool output, Common::Rect textRect, const char *text, Image *targetImage=nullptr) |
void | screenUpdate () |
void | setAmigaPal (uint16 *pal) |
void | writeColorRegs (byte *buf, uint16 first, uint16 numReg) |
void | setPalette (void *newPal, uint16 numColors) |
void | checkerBoardEffect (uint16 penColor, uint16 x1, uint16 y1, uint16 x2, uint16 y2) |
byte * | getCurrentDrawingBuffer () |
void | scrollDisplayX (int16 dx, uint16 x1, uint16 y1, uint16 x2, uint16 y2, byte *buffer) |
void | scrollDisplayY (int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2, byte *buffer) |
void | fade (bool fadein) |
void | freeFont (TextFont **font) |
uint16 | textHeight (TextFont *tf) |
Public Attributes | |
bool | _longWinInFront |
bool | _lastMessageLong |
uint32 | _screenBytesPerPage |
int | _screenWidth |
int | _screenHeight |
byte * | _displayBuffer |
uint16 * | _fadePalette |
void Lab::DisplayMan::readPict | ( | const Common::String | filename, |
bool | playOnce = true , |
||
bool | onlyDiffData = false , |
||
byte * | memoryBuffer = nullptr |
||
) |
Reads in a picture into the display bitmap.
void Lab::DisplayMan::doTransition | ( | TransitionType | transitionType, |
const Common::String | filename | ||
) |
Does a certain number of pre-programmed wipes.
void Lab::DisplayMan::blackScreen | ( | ) |
Changes the front screen to black.
void Lab::DisplayMan::whiteScreen | ( | ) |
Changes the front screen to white.
void Lab::DisplayMan::blackAllScreen | ( | ) |
Changes the entire screen to black.
void Lab::DisplayMan::drawPanel | ( | ) |
Draws the control panel display.
void Lab::DisplayMan::setUpScreens | ( | ) |
Sets up the Labyrinth screens, and opens up the initial windows.
void Lab::DisplayMan::drawMessage | ( | Common::String | str, |
bool | isActionMessage | ||
) |
Draws a message to the message box.
void Lab::DisplayMan::rectFill | ( | uint16 | x1, |
uint16 | y1, | ||
uint16 | x2, | ||
uint16 | y2, | ||
byte | color | ||
) |
Fills in a rectangle.
int Lab::DisplayMan::flowText | ( | TextFont * | font, |
int16 | spacing, | ||
byte | penColor, | ||
byte | backPen, | ||
bool | fillBack, | ||
bool | centerh, | ||
bool | centerv, | ||
bool | output, | ||
Common::Rect | textRect, | ||
const char * | text, | ||
Image * | targetImage = nullptr |
||
) |
Dumps a chunk of text to an arbitrary box; flows it within that box and optionally centers it. Returns the number of characters that were processed.
font | Pointer on the font used |
spacing | How much vertical spacing between the lines |
penColor | Pen number to use for text |
backPen | Background color |
fillBack | Whether to fill the background |
centerh | Whether to center the text horizontally |
centerv | Whether to center the text vertically |
output | Whether to output any text |
textRect | Coords |
text | The text itself |
void Lab::DisplayMan::setAmigaPal | ( | uint16 * | pal | ) |
Converts a 16-color Amiga palette to a VGA palette, then sets the VGA palette.
void Lab::DisplayMan::writeColorRegs | ( | byte * | buf, |
uint16 | first, | ||
uint16 | numReg | ||
) |
Writes any number of the 256 color registers.
buf | A char pointer which contains the selected color registers. Each value representing a color register occupies 3 bytes in the array. The order is red, green then blue. The first byte in the array is the red component of the first element selected. The length of the buffer is 3 times the number of registers selected. |
first | The number of the first color register to write. |
numReg | The number of registers to write. |
void Lab::DisplayMan::checkerBoardEffect | ( | uint16 | penColor, |
uint16 | x1, | ||
uint16 | y1, | ||
uint16 | x2, | ||
uint16 | y2 | ||
) |
Overlays a region on the screen using the desired pen color.
byte* Lab::DisplayMan::getCurrentDrawingBuffer | ( | ) |
Returns the base address of the current VGA display.
void Lab::DisplayMan::scrollDisplayX | ( | int16 | dx, |
uint16 | x1, | ||
uint16 | y1, | ||
uint16 | x2, | ||
uint16 | y2, | ||
byte * | buffer | ||
) |
Scrolls the display in the x direction by blitting. The _tempScrollData variable must be initialized to some memory, or this function will fail.
void Lab::DisplayMan::scrollDisplayY | ( | int16 | dy, |
uint16 | x1, | ||
uint16 | y1, | ||
uint16 | x2, | ||
uint16 | y2, | ||
byte * | buffer | ||
) |
Scrolls the display in the y direction by blitting.
void Lab::DisplayMan::freeFont | ( | TextFont ** | font | ) |
Closes a font and frees all memory associated with it.
uint16 Lab::DisplayMan::textHeight | ( | TextFont * | tf | ) |
Returns the height of a specified font.