ScummVM API documentation
Lab::DisplayMan Class Reference

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
 

Member Function Documentation

◆ readPict()

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.

◆ doTransition()

void Lab::DisplayMan::doTransition ( TransitionType  transitionType,
const Common::String  filename 
)

Does a certain number of pre-programmed wipes.

◆ blackScreen()

void Lab::DisplayMan::blackScreen ( )

Changes the front screen to black.

◆ whiteScreen()

void Lab::DisplayMan::whiteScreen ( )

Changes the front screen to white.

◆ blackAllScreen()

void Lab::DisplayMan::blackAllScreen ( )

Changes the entire screen to black.

◆ drawPanel()

void Lab::DisplayMan::drawPanel ( )

Draws the control panel display.

◆ setUpScreens()

void Lab::DisplayMan::setUpScreens ( )

Sets up the Labyrinth screens, and opens up the initial windows.

◆ drawMessage()

void Lab::DisplayMan::drawMessage ( Common::String  str,
bool  isActionMessage 
)

Draws a message to the message box.

◆ rectFill()

void Lab::DisplayMan::rectFill ( uint16  x1,
uint16  y1,
uint16  x2,
uint16  y2,
byte  color 
)

Fills in a rectangle.

◆ flowText()

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.

Note
Every individual word MUST be int16 enough to fit on a line, and each line less than 255 characters.
Parameters
fontPointer on the font used
spacingHow much vertical spacing between the lines
penColorPen number to use for text
backPenBackground color
fillBackWhether to fill the background
centerhWhether to center the text horizontally
centervWhether to center the text vertically
outputWhether to output any text
textRectCoords
textThe text itself

◆ setAmigaPal()

void Lab::DisplayMan::setAmigaPal ( uint16 *  pal)

Converts a 16-color Amiga palette to a VGA palette, then sets the VGA palette.

◆ writeColorRegs()

void Lab::DisplayMan::writeColorRegs ( byte *  buf,
uint16  first,
uint16  numReg 
)

Writes any number of the 256 color registers.

Parameters
bufA 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.
firstThe number of the first color register to write.
numRegThe number of registers to write.

◆ checkerBoardEffect()

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.

◆ getCurrentDrawingBuffer()

byte* Lab::DisplayMan::getCurrentDrawingBuffer ( )

Returns the base address of the current VGA display.

◆ scrollDisplayX()

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.

◆ scrollDisplayY()

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.

◆ freeFont()

void Lab::DisplayMan::freeFont ( TextFont **  font)

Closes a font and frees all memory associated with it.

◆ textHeight()

uint16 Lab::DisplayMan::textHeight ( TextFont tf)

Returns the height of a specified font.


The documentation for this class was generated from the following file: