| 179 | |
| 180 | float dz = 0.5 * (posTL.Z() + posBR.Z() - 2.0 * position.Z()); |
| 181 | float scale = (posBase.Z() + dz) / (position.Z() + dz); |
| 182 | |
| 183 | DrawCoord pt1 = SceneToScreen(posTL); |
| 184 | DrawCoord pt2 = SceneToScreen(posBR); |
| 185 | float w = pt2.x - pt1.x; |
| 186 | float h = pt2.y - pt1.y; |
| 187 | info._control->SetPos(pt1.x + info.x * w, pt1.y + info.y * h, info.w * w, info.h * h); |
| 188 | info._control->SetScale(scale); |
| 189 | } |
| 190 | |
| 191 | void IControl::PlaySound(SoundPars& pars) |
| 192 | { |
| 193 | if (pars.name.GetLength() > 0) |
| 194 | { |
| 195 | // float volume = GSoundsys->GetSpeechVolCoef(); |
| 196 | IWave* wave = GSoundScene->OpenAndPlayOnce2D(pars.name, pars.vol, pars.freq, false); |
| 197 | if (wave) |
| 198 | { |
nothing calls this directly
no test coverage detected