| 123 | } |
| 124 | |
| 125 | void SoundObject::LoadSound() |
| 126 | { |
| 127 | SoundPars pars; |
| 128 | const ParamEntry* cls = FindSound(_soundName, pars); |
| 129 | |
| 130 | if (cls) |
| 131 | { |
| 132 | ParamEntry* entry = cls->FindEntry("forceTitles"); |
| 133 | if (entry) |
| 134 | { |
| 135 | _forceTitles = *entry; |
| 136 | } |
| 137 | if (_forceTitles || USER_CONFIG.showTitles) |
| 138 | { |
| 139 | entry = cls->FindEntry("titlesFont"); |
| 140 | if (entry) |
| 141 | { |
| 142 | _titlesFont = GEngine->LoadFont(GetFontID(*entry)); |
| 143 | _titlesSize = (*cls) >> "titlesSize"; |
| 144 | } |
| 145 | |
| 146 | const ParamEntry& cfg = (*cls) >> "titles"; |
| 147 | int n = cfg.GetSize() / 2; |
| 148 | for (int i = 0; i < n; i++) |
| 149 | { |
| 150 | int index = _titles.Add(); |
| 151 | float t = cfg[2 * i]; |
| 152 | _titles[index].time = Glob.time + t; |
| 153 | _titles[index].text = cfg[2 * i + 1]; |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | static OLinkArray<SoundObject> SpeakingObjects; |
| 160 | |