| 1376 | { |
| 1377 | return; |
| 1378 | } |
| 1379 | |
| 1380 | xTextAsset* a = (xTextAsset*)xSTFindAsset(textID, NULL); |
| 1381 | if (!a) |
| 1382 | { |
| 1383 | return; |
| 1384 | } |
| 1385 | |
| 1386 | add_text((const char*)(a + 1)); |
| 1387 | } |
| 1388 | void ztalkbox::clear_text() |
| 1389 | { |
| 1390 | set_text((const char*)NULL); |
| 1391 | } |
| 1392 | void ztalkbox::start_talk(const char* s, callback* cb, zNPCCommon* npc) |
| 1393 | { |
| 1394 | this->npc = npc; |
| 1395 | |
| 1396 | if (shared.active) |
| 1397 | { |
| 1398 | shared.active->stop_talk(); |
| 1399 | } |
| 1400 | |
| 1401 | activate(*this); |
| 1402 | |
| 1403 | shared.cb = cb; |
| 1404 | shared.wait_event_mask = 0; |
| 1405 | |
| 1406 | reset_auto_wait(); |
| 1407 | |
| 1408 | shared.allow_quit = (asset->allow_quit != 0); |
| 1409 | shared.quitting = false; |
| 1410 | |
| 1411 | if (asset->trap) |
| 1412 | { |
| 1413 | zEntPlayerControlOff((zControlOwner)0x10); |
| 1414 | } |
| 1415 | else |
| 1416 | { |
| 1417 | zEntPlayerControlOn((zControlOwner)0x10); |
| 1418 | } |
| 1419 | MasterTellSlaves(1); |
| 1420 | refresh_prompts(); |
| 1421 | |
| 1422 | ztextbox& d = *dialog_box; |
| 1423 | |
| 1424 | if (d.flag.active) |
| 1425 | { |
| 1426 | d.deactivate(); |
| 1427 | } |
| 1428 | |
| 1429 | if (s) |
| 1430 | { |
| 1431 | d.set_text(s); |
| 1432 | } |
| 1433 | |
| 1434 | d.refresh(); |
| 1435 |
no test coverage detected