Пример #1
0
void MHTransitionTo::Initialise(MHParseNode *p, MHEngine *engine)
{
    MHElemAction::Initialise(p, engine); // Target
    // The next one may be present but NULL in binary.
    if (p->GetArgCount() > 1) {
        MHParseNode *pCtag = p->GetArgN(1);
        if (pCtag->m_nNodeType == MHParseNode::PNInt) {
            m_fIsTagged = TRUE;
            m_nConnectionTag = pCtag->GetIntValue();
        }
    }
    if (p->GetArgCount() > 2) {
        MHParseNode *pTrEff = p->GetArgN(2);
        m_nTransitionEffect = pTrEff->GetIntValue();
    }
}
Пример #2
0
void MHAudio::Initialise(MHParseNode *p, MHEngine *engine)
{
    MHPresentable::Initialise(p, engine);
    MHParseNode *pComponentTagNode =  p->GetNamedArg(C_COMPONENT_TAG);
    if (pComponentTagNode) m_nComponentTag = pComponentTagNode->GetArgN(0)->GetIntValue();
    MHParseNode *pOrigVol = p->GetNamedArg(C_ORIGINAL_VOLUME);
    if (pOrigVol) m_nOriginalVol = pOrigVol->GetIntValue();
}