Equivalent: branching weirdness
| 60 | |
| 61 | // Equivalent: branching weirdness |
| 62 | void ztaskbox::start_talk(zNPCCommon* npc) |
| 63 | { |
| 64 | ztaskbox* curr = this->current; |
| 65 | if (curr != NULL) |
| 66 | { |
| 67 | if (curr != this) |
| 68 | { |
| 69 | curr->set_callback(this->cb); |
| 70 | this->current->start_talk(NULL); |
| 71 | } |
| 72 | else |
| 73 | { |
| 74 | if (this->flag.enabled && this->state != STATE_INVALID) |
| 75 | { |
| 76 | if (shared != NULL && shared != this) |
| 77 | { |
| 78 | shared->stop_talk(); |
| 79 | } |
| 80 | ztalkbox* talkbox = (ztalkbox*)zSceneFindObject(asset->talk_box); |
| 81 | if (talkbox != NULL) |
| 82 | { |
| 83 | U32 text = current->get_text(asset->stages[state]); |
| 84 | if (text != 0) |
| 85 | { |
| 86 | shared = this; |
| 87 | tcb->reset(*this); |
| 88 | talkbox->start_talk(text, tcb, npc); |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | void ztaskbox::stop_talk() |
| 97 | { |
no test coverage detected