

Definition at line 13 of file PlannedDialog.h.
Public Member Functions | |
| PlannedDialog (int actor, const Dialog *dialog, int minTime) | |
| Structure to store planned dialog. | |
| void | talk (int volume, int loops=0) |
| Run talk. | |
| void | killTalk () |
| Stop talking. | |
| bool | isTalking () const |
| Return true when is playing or return true for minimal time according subtitle length. | |
| bool | equalsActor (int other) const |
|
||||||||||||||||
|
Structure to store planned dialog.
Definition at line 21 of file PlannedDialog.cpp. 00022 {
00023 m_actor = actor;
00024 m_dialog = dialog;
00025 m_channel = -1;
00026 m_endtime = 0;
00027 m_minTime = minTime;
00028 }
|
|
|
Definition at line 49 of file PlannedDialog.cpp. 00050 {
00051 return m_actor == other;
00052 }
|
|
|
Return true when is playing or return true for minimal time according subtitle length.
Definition at line 86 of file PlannedDialog.cpp. 00087 {
00088 bool result = false;
00089 if (m_channel > -1) {
00090 result = isPlaying();
00091 }
00092 else {
00093 result = m_endtime > TimerAgent::agent()->getCycles();
00094 }
00095
00096 return result;
00097 }
|
|
|
Stop talking.
Definition at line 58 of file PlannedDialog.cpp. 00059 {
00060 if (isPlaying()) {
00061 Mix_HaltChannel(m_channel);
00062 }
00063 }
|
|
||||||||||||
|
Run talk.
Definition at line 36 of file PlannedDialog.cpp. 00037 {
00038 m_channel = m_dialog->talk(volume, loops);
00039 if (loops == -1) {
00040 m_endtime = 1 << 30;
00041 }
00042 else {
00043 m_endtime = m_minTime * (loops + 1) + TimerAgent::agent()->getCycles();
00044 }
00045 }
|
1.4.2