81 TalkTable *tableMale = 0, *tableFemale = 0;
82 loadTables(nameMale, nameFemale, tableMale, tableFemale,
LangMan.getCurrentEncoding());
84 if (!tableMale && !tableFemale)
93 tables->push_back(
Table(tableMale, tableFemale, priority,
id));
117 for (Tables::iterator t = tables->begin(); t != tables->end(); ++t) {
118 if (t->id == change->
_id) {
132 gender =
LangMan.getCurrentGender();
146 gender =
LangMan.getCurrentGender();
165 for (Tables::const_reverse_iterator t = tables.rbegin(); t != tables.rend(); ++t) {
167 if (t->tableFemale && t->tableFemale->hasEntry(strRef))
168 return t->tableFemale;
170 if (t->tableMale && t->tableMale->hasEntry(strRef))
178 bool isAlt = (strRef & 0xFF000000) != 0;
180 strRef &= 0x00FFFFFF;
#define ResMan
Shortcut for accessing the sound manager.
const TalkTable * find(uint32 strRef, LanguageGender gender) const
static TalkTable * loadTable(const Common::UString &name, Common::Encoding encoding)
A class holding an UTF-8 string.
const Common::UString & getString(uint32 strRef, LanguageGender gender=kLanguageGenderCurrent)
The global Aurora talk manager, holding the current talk tables.
PointerType release()
Returns the plain pointer value and releases ScopedPtr.
Base class for BioWare's talk tables.
Utility functions for generating unique IDs.
virtual const Common::UString & getString(uint32 strRef) const =0
ChangeContent * getContent() const
static void loadTables(const Common::UString &nameM, const Common::UString &nameF, TalkTable *&tableM, TalkTable *&tableF, Common::Encoding encoding)
A simple scoped smart pointer template.
Basic exceptions to throw.
const char * c_str() const
Return the (utf8 encoded) string data.
void addTable(const Common::UString &nameMale, const Common::UString &nameFemale, bool isAlt, uint32 priority, Common::ChangeID *changeID=0)
Add a talk table to the talk manager.
virtual const Common::UString & getSoundResRef(uint32 strRef) const =0
const Common::UString & getSoundResRef(uint32 strRef, LanguageGender gender=kLanguageGenderCurrent)
static TalkTable * load(Common::SeekableReadStream *tlk, Common::Encoding encoding)
Take over this stream and read a talk table (of either format) out of it.
#define DECLARE_SINGLETON(T)
Note that you need to use this macro from the global namespace.
static const uint32 kStrRefInvalid
Utility functions for working with differing string encodings.
bool empty() const
Is the string empty?
Base class for BioWare's talk tables.
void setContent(ChangeContent *content)
A scoped plain pointer, allowing pointer-y access and normal deletion.
void deleteTable(Table &table)
void removeTable(Common::ChangeID &changeID)
Remove a talk table from the talk manager again.
Basic reading stream interfaces.
Pseudo value that means the current language gender.
#define LangMan
Shortcut for accessing the language manager.
A class representing an undoable change.
The global talk manager for Aurora strings.
std::list< Table > Tables
static const Common::UString kEmptyString
Interface for a seekable & readable data stream.
The global resource manager for Aurora resources.
uint32 generateIDNumber()