Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
GameTextManager Class Reference

Inherits GameTextInterface, and GameTextInterface.

Public Member Functions

 GameTextManager ()
 
virtual ~GameTextManager ()
 
virtual void init (void)
 Initlaizes the text system.
 
virtual void deinit (void)
 De-initlaizes the text system.
 
virtual void update (void)
 
virtual void reset (void)
 update text manager
 
virtual UnicodeString fetch (const Char *label, Bool *exists=NULL)
 Returns the associated labeled unicode text.
 
virtual UnicodeString fetch (AsciiString label, Bool *exists=NULL)
 Returns the associated labeled unicode text.
 
virtual AsciiStringVecgetStringsWithLabelPrefix (AsciiString label)
 
virtual void initMapStringFile (const AsciiString &filename)
 
 GameTextManager ()
 
virtual ~GameTextManager ()
 
virtual void init (void)
 Initlaizes the text system.
 
virtual void deinit (void)
 De-initlaizes the text system.
 
virtual void update (void)
 
virtual void reset (void)
 update text manager
 
virtual const wchar_t * fetch (const Char *label)
 Returns the associated labeled unicode text.
 
- Public Member Functions inherited from GameTextInterface
virtual ~GameTextInterface ()
 
virtual ~GameTextInterface ()
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Member Functions

void stripSpaces (WideChar *string)
 
void removeLeadingAndTrailing (Char *m_buffer)
 
void readToEndOfQuote (File *file, Char *in, Char *out, Char *wavefile, Int maxBufLen)
 
void reverseWord (Char *file, Char *lp)
 
void translateCopy (WideChar *outbuf, Char *inbuf)
 
Bool getStringCount (const Char *filename, Int &textCount)
 
Bool getCSFInfo (const Char *filename)
 
Bool parseCSF (const Char *filename)
 
Bool parseStringFile (const char *filename)
 
Bool parseMapStringFile (const char *filename)
 
Bool readLine (char *buffer, Int max, File *file)
 
Char readChar (File *file)
 
void stripSpaces (WideChar *string)
 
void removeLeadingAndTrailing (Char *m_buffer)
 
void readToEndOfQuote (File *file, Char *in, Char *out, Char *wavefile, Int maxBufLen)
 
void reverseWord (Char *file, Char *lp)
 
void translateCopy (WideChar *outbuf, Char *inbuf)
 
Bool getStringCount (Char *filename)
 
Bool getCSFInfo (Char *filename)
 
Bool parseCSF (Char *filename)
 
Bool parseStringFile (char *filename)
 
Bool readLine (char *buffer, Int max, File *file)
 
Char readChar (File *file)
 

Protected Attributes

Int m_textCount
 
Int m_maxLabelLen
 
Char m_buffer [MAX_UITEXT_LENGTH]
 
Char m_buffer2 [MAX_UITEXT_LENGTH]
 
Char m_buffer3 [MAX_UITEXT_LENGTH]
 
WideChar m_tbuffer [MAX_UITEXT_LENGTH *2]
 
StringInfom_stringInfo
 
StringLookUpm_stringLUT
 
Bool m_initialized
 
NoStringm_noStringList
 
Int m_useStringFile
 
LanguageID m_language
 
UnicodeString m_failed
 
StringInfom_mapStringInfo
 
StringLookUpm_mapStringLUT
 
Int m_mapTextCount
 
AsciiStringVec m_asciiStringVec
 
Bool m_jabberWockie
 
Bool m_munkee
 
std::wstring m_failed
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

Definition at line 140 of file GameText.cpp.

Constructor & Destructor Documentation

◆ GameTextManager() [1/2]

GameTextManager::GameTextManager ( )

Definition at line 244 of file GameText.cpp.

◆ ~GameTextManager() [1/2]

GameTextManager::~GameTextManager ( )
virtual

Definition at line 278 of file GameText.cpp.

◆ GameTextManager() [2/2]

GameTextManager::GameTextManager ( )

◆ ~GameTextManager() [2/2]

virtual GameTextManager::~GameTextManager ( )
virtual

Member Function Documentation

◆ deinit() [1/2]

void GameTextManager::deinit ( void )
virtual

De-initlaizes the text system.

Definition at line 389 of file GameText.cpp.

◆ deinit() [2/2]

virtual void GameTextManager::deinit ( void )
virtual

De-initlaizes the text system.

◆ fetch() [1/3]

UnicodeString GameTextManager::fetch ( AsciiString label,
Bool * exists = NULL )
virtual

Returns the associated labeled unicode text.

Implements GameTextInterface.

Definition at line 1330 of file GameText.cpp.

◆ fetch() [2/3]

const wchar_t * GameTextManager::fetch ( const Char * label)
virtual

Returns the associated labeled unicode text.

Implements GameTextInterface.

Definition at line 1053 of file GameText.cpp.

◆ fetch() [3/3]

UnicodeString GameTextManager::fetch ( const Char * label,
Bool * exists = NULL )
virtual

Returns the associated labeled unicode text.

Implements GameTextInterface.

Definition at line 1267 of file GameText.cpp.

◆ getCSFInfo() [1/2]

Bool GameTextManager::getCSFInfo ( Char * filename)
protected

Definition at line 801 of file GameText.cpp.

◆ getCSFInfo() [2/2]

Bool GameTextManager::getCSFInfo ( const Char * filename)
protected

Definition at line 865 of file GameText.cpp.

◆ getStringCount() [1/2]

Bool GameTextManager::getStringCount ( Char * filename)
protected

Definition at line 760 of file GameText.cpp.

◆ getStringCount() [2/2]

Bool GameTextManager::getStringCount ( const Char * filename,
Int & textCount )
protected

Definition at line 821 of file GameText.cpp.

◆ getStringsWithLabelPrefix()

AsciiStringVec & GameTextManager::getStringsWithLabelPrefix ( AsciiString label)
virtual

Implements GameTextInterface.

Definition at line 1339 of file GameText.cpp.

◆ init() [1/2]

void GameTextManager::init ( void )
virtual

Initlaizes the text system.

< our application window handle

Implements GameTextInterface.

Definition at line 290 of file GameText.cpp.

◆ init() [2/2]

virtual void GameTextManager::init ( void )
virtual

Initlaizes the text system.

Implements GameTextInterface.

◆ initMapStringFile()

void GameTextManager::initMapStringFile ( const AsciiString & filename)
virtual

Implements GameTextInterface.

Definition at line 1132 of file GameText.cpp.

◆ parseCSF() [1/2]

Bool GameTextManager::parseCSF ( Char * filename)
protected

Definition at line 829 of file GameText.cpp.

◆ parseCSF() [2/2]

Bool GameTextManager::parseCSF ( const Char * filename)
protected

Definition at line 904 of file GameText.cpp.

◆ parseMapStringFile()

Bool GameTextManager::parseMapStringFile ( const char * filename)
protected

Definition at line 1161 of file GameText.cpp.

◆ parseStringFile() [1/2]

Bool GameTextManager::parseStringFile ( char * filename)
protected

Definition at line 953 of file GameText.cpp.

◆ parseStringFile() [2/2]

Bool GameTextManager::parseStringFile ( const char * filename)
protected

Definition at line 1031 of file GameText.cpp.

◆ readChar() [1/2]

Char GameTextManager::readChar ( File * file)
protected

Definition at line 1389 of file GameText.cpp.

◆ readChar() [2/2]

Char GameTextManager::readChar ( File * file)
protected

◆ readLine() [1/2]

Bool GameTextManager::readLine ( char * buffer,
Int max,
File * file )
protected

Definition at line 1363 of file GameText.cpp.

◆ readLine() [2/2]

Bool GameTextManager::readLine ( char * buffer,
Int max,
File * file )
protected

◆ readToEndOfQuote() [1/2]

void GameTextManager::readToEndOfQuote ( File * file,
Char * in,
Char * out,
Char * wavefile,
Int maxBufLen )
protected

Definition at line 523 of file GameText.cpp.

◆ readToEndOfQuote() [2/2]

void GameTextManager::readToEndOfQuote ( File * file,
Char * in,
Char * out,
Char * wavefile,
Int maxBufLen )
protected

◆ removeLeadingAndTrailing() [1/2]

void GameTextManager::removeLeadingAndTrailing ( Char * m_buffer)
protected

Definition at line 494 of file GameText.cpp.

◆ removeLeadingAndTrailing() [2/2]

void GameTextManager::removeLeadingAndTrailing ( Char * m_buffer)
protected

◆ reset() [1/2]

void GameTextManager::reset ( void )
virtual

update text manager

Resets the text system

Implements SubsystemInterface.

Definition at line 427 of file GameText.cpp.

◆ reset() [2/2]

virtual void GameTextManager::reset ( void )
virtual

update text manager

Resets the text system

Implements SubsystemInterface.

◆ reverseWord() [1/2]

void GameTextManager::reverseWord ( Char * file,
Char * lp )
protected

Definition at line 653 of file GameText.cpp.

◆ reverseWord() [2/2]

void GameTextManager::reverseWord ( Char * file,
Char * lp )
protected

◆ stripSpaces() [1/2]

void GameTextManager::stripSpaces ( WideChar * string)
protected

Definition at line 447 of file GameText.cpp.

◆ stripSpaces() [2/2]

void GameTextManager::stripSpaces ( WideChar * string)
protected

◆ translateCopy() [1/2]

void GameTextManager::translateCopy ( WideChar * outbuf,
Char * inbuf )
protected

Definition at line 694 of file GameText.cpp.

◆ translateCopy() [2/2]

void GameTextManager::translateCopy ( WideChar * outbuf,
Char * inbuf )
protected

◆ update() [1/2]

virtual void GameTextManager::update ( void )
inlinevirtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implements SubsystemInterface.

Definition at line 149 of file GameText.cpp.

◆ update() [2/2]

virtual void GameTextManager::update ( void )
inlinevirtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implements SubsystemInterface.

Definition at line 142 of file GameText.cpp.

Member Data Documentation

◆ m_asciiStringVec

AsciiStringVec GameTextManager::m_asciiStringVec
protected

m_asciiStringVec will be altered every time that getStringsWithLabelPrefix is called, so don't simply store a pointer to it.

Definition at line 185 of file GameText.cpp.

◆ m_buffer

Char GameTextManager::m_buffer
protected

Definition at line 162 of file GameText.cpp.

◆ m_buffer2

Char GameTextManager::m_buffer2
protected

Definition at line 163 of file GameText.cpp.

◆ m_buffer3

Char GameTextManager::m_buffer3
protected

Definition at line 164 of file GameText.cpp.

◆ m_failed [1/2]

UnicodeString GameTextManager::m_failed
protected

Definition at line 177 of file GameText.cpp.

◆ m_failed [2/2]

std::wstring GameTextManager::m_failed
protected

Definition at line 162 of file GameText.cpp.

◆ m_initialized

Bool GameTextManager::m_initialized
protected

Definition at line 169 of file GameText.cpp.

◆ m_jabberWockie

Bool GameTextManager::m_jabberWockie
protected

Definition at line 158 of file GameText.cpp.

◆ m_language

LanguageID GameTextManager::m_language
protected

Definition at line 176 of file GameText.cpp.

◆ m_mapStringInfo

StringInfo* GameTextManager::m_mapStringInfo
protected

Definition at line 179 of file GameText.cpp.

◆ m_mapStringLUT

StringLookUp* GameTextManager::m_mapStringLUT
protected

Definition at line 180 of file GameText.cpp.

◆ m_mapTextCount

Int GameTextManager::m_mapTextCount
protected

Definition at line 181 of file GameText.cpp.

◆ m_maxLabelLen

Int GameTextManager::m_maxLabelLen
protected

Definition at line 161 of file GameText.cpp.

◆ m_munkee

Bool GameTextManager::m_munkee
protected

Definition at line 159 of file GameText.cpp.

◆ m_noStringList

NoString * GameTextManager::m_noStringList
protected

Definition at line 174 of file GameText.cpp.

◆ m_stringInfo

StringInfo * GameTextManager::m_stringInfo
protected

Definition at line 167 of file GameText.cpp.

◆ m_stringLUT

StringLookUp * GameTextManager::m_stringLUT
protected

Definition at line 168 of file GameText.cpp.

◆ m_tbuffer

WideChar GameTextManager::m_tbuffer
protected

Definition at line 165 of file GameText.cpp.

◆ m_textCount

Int GameTextManager::m_textCount
protected

Definition at line 160 of file GameText.cpp.

◆ m_useStringFile

Int GameTextManager::m_useStringFile
protected

Definition at line 175 of file GameText.cpp.


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