Advanced Strategic Command
Functions | Variables
cannedmessages.cpp File Reference
#include <map>
#include "global.h"
#include "cannedmessages.h"
#include "basestrm.h"
Include dependency graph for cannedmessages.cpp:

Go to the source code of this file.

Functions

void loadsinglemessagefile (const char *name)
 
void loadmessages (void)
 loads all messages from the files message?.txt More...
 
const char * getmessage (int id)
 returns a pointer to the message id. The messages must have been loaded with loadmessages More...
 

Variables

map< int, ASCStringmessageStrings
 

Function Documentation

const char* getmessage ( int  id)

returns a pointer to the message id. The messages must have been loaded with loadmessages

Definition at line 55 of file cannedmessages.cpp.

References messageStrings.

Referenced by checkforvictory(), displayActionError(), dispmessage2(), trunreplay::error(), trunreplay::execnextreplaymove(), DiplomacyCommand::go(), and transfer_all_outstanding_tribute().

void loadmessages ( void  )

loads all messages from the files message?.txt

Definition at line 43 of file cannedmessages.cpp.

References tfindfile::getnextname(), and loadsinglemessagefile().

Referenced by loadcursor(), loaddata(), and loadEditordata().

void loadsinglemessagefile ( const char *  name)

Definition at line 20 of file cannedmessages.cpp.

References atoi(), messageStrings, tnstream::reading, and tnstream::readString().

Referenced by loadmessages().

Variable Documentation

map<int,ASCString> messageStrings

Definition at line 17 of file cannedmessages.cpp.

Referenced by getmessage(), and loadsinglemessagefile().