ScummVM API documentation
TwinE::Text Class Reference

Public Member Functions

 Text (TwinEEngine *engine)
 
void initDial (TextBankId bankIdx)
 
void initSceneTextBank ()
 
TextBankId textBank () const
 
void closeDial ()
 
void drawText (int32 x, int32 y, const char *dialogue, bool shadow=false)
 
bool drawTextProgressive (TextId index, bool playVox=true, bool loop=true)
 
int32 sizeFont (const char *dialogue)
 
int32 getCharWidth (uint16 chr) const
 
int32 getCharHeight (uint16 chr) const
 
void initDialWindow ()
 
void secondInitDialWindow ()
 
void commonOpenDial (TextId index)
 
void initLine ()
 
void initInventoryText (InventoryItems index)
 
void initItemFoundText (InventoryItems index)
 
void fadeInRemainingChars ()
 
ProgressiveTextState nextDialChar ()
 
void setFont (int32 interLeave, int32 interSpace)
 
void setFontCrossColor (int32 color)
 
void setFontColor (int32 color)
 
void setTextCrossColor (int32 stopColor, int32 startColor, int32 stepSize)
 
bool getText (TextId index)
 
bool getMenuText (TextId index, char *text, uint32 textSize)
 
void bigWinDial ()
 
void normalWinDial ()
 
void drawAskQuestion (TextId index)
 
void drawHolomapLocation (TextId index)
 
bool playVox (const TextEntry *text)
 
bool playVoxSimple (const TextEntry *text)
 
bool stopVox (const TextEntry *text)
 
bool initVoxToPlay (const TextEntry *text)
 
bool initVoxToPlayTextId (TextId index)
 

Public Attributes

bool _flagRunningDial = false
 
bool _flagEndDial = false
 
bool _flagEnd3Line = false
 
bool _renderTextTriangle = false
 
bool _flagMessageShade = false
 
bool _hasHiddenVox = false
 
int32 _voxHiddenIndex = 0
 
const TextEntry_currDialTextEntry = nullptr
 
Common::String _currentVoxBankFile
 
Common::String _currentOggBaseFile
 
bool _showDialogueBubble = true
 

Static Public Attributes

static const int32 lineHeight = 38
 

Member Function Documentation

◆ initDial()

void TwinE::Text::initDial ( TextBankId  bankIdx)

Initialize dialogue

Parameters
bankIdxText bank index

◆ drawText()

void TwinE::Text::drawText ( int32  x,
int32  y,
const char *  dialogue,
bool  shadow = false 
)

Display a certain dialogue text in the screen

Parameters
xX coordinate in screen
yY coordinate in screen
dialogueascii text to display

◆ sizeFont()

int32 TwinE::Text::sizeFont ( const char *  dialogue)

Gets dialogue text width size

Parameters
dialogueascii text to display

◆ setFont()

void TwinE::Text::setFont ( int32  interLeave,
int32  interSpace 
)

Set font type parameters

Parameters
interLeavenumber in pixels of space between characters
interSpacenumber in pixels of the character space

◆ setFontCrossColor()

void TwinE::Text::setFontCrossColor ( int32  color)

Set the font cross color

Parameters
colorcolor number to choose

◆ setFontColor()

void TwinE::Text::setFontColor ( int32  color)

Set the font color

Parameters
colorcolor number to choose

◆ setTextCrossColor()

void TwinE::Text::setTextCrossColor ( int32  stopColor,
int32  startColor,
int32  stepSize 
)

Set font color parameters to precess cross color display

Parameters
stopColorcolor number to stop
startColorcolor number to start
stepSizestep size to change between those colors

◆ getText()

bool TwinE::Text::getText ( TextId  index)

Get dialogue text into text buffer from the currently loaded text bank

See also
initDial()
Parameters
indexdialogue index

◆ getMenuText()

bool TwinE::Text::getMenuText ( TextId  index,
char *  text,
uint32  textSize 
)

Gets menu dialogue text

Parameters
indextext index to display
textdialogue text buffer to display
textSizeThe size of the text buffer

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