ScummVM
Kyra::TextDisplayer Class Reference

#include <text.h>

Inheritance diagram for Kyra::TextDisplayer:
Collaboration diagram for Kyra::TextDisplayer:

Classes

struct  TalkCoords
 

Public Member Functions

 TextDisplayer (KyraEngine_v1 *vm, Screen *screen)
 
virtual ~TextDisplayer ()
 
int maxSubstringLen () const
 
void setTalkCoords (uint16 y)
 
int getCenterStringX (const char *str, int x1, int x2)
 
int getCharLength (const char *str, int len)
 
int dropCRIntoString (char *str, int offs)
 
virtual char * preprocessString (const char *str)
 
int buildMessageSubstrings (const char *str)
 
int getWidestLineWidth (int linesCount)
 
virtual void calcWidestLineBounds (int &x1, int &x2, int w, int cx)
 
virtual void restoreTalkTextMessageBkgd (int srcPage, int dstPage)
 
void printTalkTextMessage (const char *text, int x, int y, uint8 color, int srcPage, int dstPage)
 
virtual void printText (const char *str, int x, int y, uint8 c0, uint8 c1, uint8 c2)
 
void printCharacterText (const char *text, int8 charNum, int charX)
 
bool printed () const
 

Public Attributes

uint16 _talkMessageY
 
uint16 _talkMessageH
 

Protected Types

enum  { TALK_SUBSTRING_LEN = 80, TALK_SUBSTRING_NUM = 6 }
 

Protected Member Functions

void setTextColor (uint8 color)
 

Protected Attributes

Screen_screen
 
KyraEngine_v1_vm
 
char _talkBuffer [1040]
 
char _talkSubstrings [TALK_SUBSTRING_LEN *TALK_SUBSTRING_NUM]
 
TalkCoords _talkCoords
 
bool _talkMessagePrinted
 

Detailed Description

Definition at line 33 of file text.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
TALK_SUBSTRING_LEN 
TALK_SUBSTRING_NUM 

Definition at line 68 of file text.h.

Constructor & Destructor Documentation

◆ TextDisplayer()

Kyra::TextDisplayer::TextDisplayer ( KyraEngine_v1 vm,
Screen screen 
)

Definition at line 28 of file text.cpp.

◆ ~TextDisplayer()

virtual Kyra::TextDisplayer::~TextDisplayer ( )
inlinevirtual

Definition at line 36 of file text.h.

Member Function Documentation

◆ buildMessageSubstrings()

int Kyra::TextDisplayer::buildMessageSubstrings ( const char *  str)

Definition at line 124 of file text.cpp.

◆ calcWidestLineBounds()

void Kyra::TextDisplayer::calcWidestLineBounds ( int x1,
int x2,
int  w,
int  cx 
)
virtual

Reimplemented in Kyra::TextDisplayer_HoF, and Kyra::TextDisplayer_MR.

Definition at line 158 of file text.cpp.

◆ dropCRIntoString()

int Kyra::TextDisplayer::dropCRIntoString ( char *  str,
int  offs 
)

Definition at line 74 of file text.cpp.

◆ getCenterStringX()

int Kyra::TextDisplayer::getCenterStringX ( const char *  str,
int  x1,
int  x2 
)

Definition at line 46 of file text.cpp.

◆ getCharLength()

int Kyra::TextDisplayer::getCharLength ( const char *  str,
int  len 
)

Definition at line 54 of file text.cpp.

◆ getWidestLineWidth()

int Kyra::TextDisplayer::getWidestLineWidth ( int  linesCount)

Definition at line 145 of file text.cpp.

◆ maxSubstringLen()

int Kyra::TextDisplayer::maxSubstringLen ( ) const
inline

Definition at line 38 of file text.h.

◆ preprocessString()

char * Kyra::TextDisplayer::preprocessString ( const char *  str)
virtual

Reimplemented in Kyra::TextDisplayer_HoF, and Kyra::TextDisplayer_MR.

Definition at line 88 of file text.cpp.

◆ printCharacterText()

void Kyra::TextDisplayer::printCharacterText ( const char *  text,
int8  charNum,
int  charX 
)

Definition at line 215 of file text.cpp.

◆ printed()

bool Kyra::TextDisplayer::printed ( ) const
inline

Definition at line 55 of file text.h.

◆ printTalkTextMessage()

void Kyra::TextDisplayer::printTalkTextMessage ( const char *  text,
int  x,
int  y,
uint8  color,
int  srcPage,
int  dstPage 
)

Definition at line 175 of file text.cpp.

◆ printText()

void Kyra::TextDisplayer::printText ( const char *  str,
int  x,
int  y,
uint8  c0,
uint8  c1,
uint8  c2 
)
virtual

Reimplemented in Kyra::TextDisplayer_MR.

Definition at line 206 of file text.cpp.

◆ restoreTalkTextMessageBkgd()

void Kyra::TextDisplayer::restoreTalkTextMessageBkgd ( int  srcPage,
int  dstPage 
)
virtual

Reimplemented in Kyra::TextDisplayer_HoF.

Definition at line 168 of file text.cpp.

◆ setTalkCoords()

void Kyra::TextDisplayer::setTalkCoords ( uint16  y)

Definition at line 42 of file text.cpp.

◆ setTextColor()

void Kyra::TextDisplayer::setTextColor ( uint8  color)
protected

Definition at line 244 of file text.cpp.

Member Data Documentation

◆ _screen

Screen* Kyra::TextDisplayer::_screen
protected

Definition at line 58 of file text.h.

◆ _talkBuffer

char Kyra::TextDisplayer::_talkBuffer[1040]
protected

Definition at line 73 of file text.h.

◆ _talkCoords

TalkCoords Kyra::TextDisplayer::_talkCoords
protected

Definition at line 75 of file text.h.

◆ _talkMessageH

uint16 Kyra::TextDisplayer::_talkMessageH

Definition at line 54 of file text.h.

◆ _talkMessagePrinted

bool Kyra::TextDisplayer::_talkMessagePrinted
protected

Definition at line 76 of file text.h.

◆ _talkMessageY

uint16 Kyra::TextDisplayer::_talkMessageY

Definition at line 53 of file text.h.

◆ _talkSubstrings

char Kyra::TextDisplayer::_talkSubstrings[TALK_SUBSTRING_LEN *TALK_SUBSTRING_NUM]
protected

Definition at line 74 of file text.h.

◆ _vm

KyraEngine_v1* Kyra::TextDisplayer::_vm
protected

Definition at line 59 of file text.h.


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