| 18 | } |
| 19 | |
| 20 | void ztaskbox::load(const ztaskbox::asset_type& a) |
| 21 | { |
| 22 | xBaseInit((xBase*)this, &(xBaseAsset)a); |
| 23 | this->baseType = eBaseTypeTaskBox; |
| 24 | this->asset = &a; |
| 25 | this->eventFunc = cb_dispatch; |
| 26 | if (this->linkCount != 0) |
| 27 | { |
| 28 | this->link = (xLinkAsset*)(&a + 1); |
| 29 | } |
| 30 | this->state = STATE_INVALID; |
| 31 | if (a.enable) |
| 32 | { |
| 33 | this->flag.enabled = true; |
| 34 | this->set_state(STATE_BEGIN); |
| 35 | this->current = this; |
| 36 | } |
| 37 | else |
| 38 | { |
| 39 | this->flag.enabled = false; |
| 40 | this->current = NULL; |
| 41 | } |
| 42 | if (a.persistent) |
| 43 | { |
| 44 | this->baseFlags |= 2; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | void ztaskbox::read(xSerial& s) |
| 49 | { |
no test coverage detected