

Definition at line 17 of file DialogStack.h.
Public Member Functions | |
| DialogStack () | |
| virtual | ~DialogStack () |
| Releases resources and stops all cycling dialogs. | |
| void | updateStack () |
| Removes finished dialogs from stack. | |
| void | addDialog (const std::string &name, Dialog *dialog) |
| Store new dialog. | |
| void | actorTalk (int actor, const std::string &name, int volume, int loops=0, bool dialogFlag=false) |
| Run talk. | |
| bool | isTalking (int actor) const |
| void | killSound (int actor) |
| Delete all running dialogs made by this actor. | |
| bool | isDialog () const |
| Returns true when there is active dialog. | |
| bool | areRunning () const |
| void | killTalks () |
| Kill all running dialogs. | |
| void | removeAll () |
| Delete all shared dialogs and kill talks. | |
|
|
Definition at line 17 of file DialogStack.cpp. 00018 {
00019 m_dialogs = new ResDialogPack();
00020 m_activeDialog = NULL;
00021 }
|
|
|
Releases resources and stops all cycling dialogs.
Definition at line 26 of file DialogStack.cpp. 00027 {
00028 removeAll();
00029 delete m_dialogs;
00030 }
|
|
||||||||||||||||||||||||
|
Run talk. Dialog name could contain "name@arg1@arg2..." to fill 1, 2, ... in subtitles.
Definition at line 62 of file DialogStack.cpp. 00064 {
00065 StringTool::t_args args = StringTool::split(name, '@');
00066
00067 const Dialog *subtitle = m_dialogs->findDialogHard(args[0]);
00068 if (subtitle) {
00069 subtitle->runSubtitle(args);
00070
00071 const Dialog *dialog = m_dialogs->findDialogSpeech(args[0]);
00072 if (dialog) {
00073 PlannedDialog *talker = new PlannedDialog(actor, dialog,
00074 subtitle->getMinTime());
00075 talker->talk(volume, loops);
00076
00077 if (loops == -1) {
00078 m_cycling.push_back(talker);
00079 }
00080 else {
00081 m_running.push_back(talker);
00082 }
00083
00084 if (dialogFlag) {
00085 m_activeDialog = talker;
00086 }
00087 }
00088 }
00089 }
|
|
||||||||||||
|
Store new dialog.
Definition at line 45 of file DialogStack.cpp. 00046 {
00047 m_dialogs->addRes(name, dialog);
00048 }
|
|
|
Definition at line 43 of file DialogStack.h. 00043 { return !m_running.empty(); }
|
|
|
Returns true when there is active dialog.
Definition at line 197 of file DialogStack.cpp. 00198 {
00199 return m_activeDialog && m_activeDialog->isTalking();
00200 }
|
|
|
Definition at line 92 of file DialogStack.cpp. 00093 {
00094 return isTalkingIn(actor, m_running) ||
00095 isTalkingIn(actor, m_cycling);
00096 }
|
|
|
Delete all running dialogs made by this actor.
Definition at line 130 of file DialogStack.cpp. 00131 {
00132 killSoundIn(actor, m_running);
00133 killSoundIn(actor, m_cycling);
00134 }
|
|
|
Kill all running dialogs.
Definition at line 157 of file DialogStack.cpp. 00158 {
00159 killTalksIn(m_running);
00160 killTalksIn(m_cycling);
00161 }
|
|
|
Delete all shared dialogs and kill talks.
Definition at line 187 of file DialogStack.cpp.
|
|
|
Removes finished dialogs from stack.
Definition at line 36 of file DialogStack.cpp. 00037 {
00038 removeFirstNotTalking();
00039 }
|
1.4.2