/*************************************************************************** * GL-ELLIPSE-2D ***************************************************************************/ GlEllipse::GlEllipse(const GlEllipseAddOn* addon, const BMessage* config) : inherited(addon, config), mAddOn(addon) { VerifyChain(new GlChain(_X_KEY, GL_1D_IO, SZ(SZ_X), this)); VerifyChain(new GlChain(_Y_KEY, GL_1D_IO, SZ(SZ_Y), this)); VerifyChain(new GlChain(_Z_KEY, GL_1D_IO, SZ(SZ_Z), this)); }
/*************************************************************************** * GL-MIRROR ***************************************************************************/ GlMirror::GlMirror(const GlNodeAddOn* addon, const BMessage* config) : inherited(addon, config) { SetPixelTargets(GL_PIXEL_ALL); bool added = false; GlChain* chain = VerifyChain(new GlChain(_HRZ_KEY, GL_2D_IO, SZ(SZ_Horizontal), this), &added); if (chain && added) { GlChainMacro m; m.Add(GL_PROMOTE_KEY).Sub(0).Add(GL_CONSTANT_KEY).SetF(GL_VALUE_PARAM_KEY, 1.0); m.Install(chain); } VerifyChain(new GlChain(_VRT_KEY, GL_2D_IO, SZ(SZ_Vertical), this)); }
/*************************************************************************** * GL-BLEND-1D ***************************************************************************/ GlBlend1d::GlBlend1d(const GlNode1dAddOn* addon, const BMessage* config) : inherited(addon, config) { bool added = false; GlChain* chain = VerifyChain(new GlChain(_MAP_KEY, GL_1D_IO, SZ(SZ_Map), this, 1), &added); if (chain && added) { GlNode* node = GlGlobals().NewNode(GL_SAWTOOTH_KEY, 0); if (node) chain->AddNode(node); } chain = VerifyChain(new GlChain(_BLEND_KEY, GL_1D_IO, SZ(SZ_Blend), this), &added); if (chain && added) { GlNode* node = GlGlobals().NewNode(GL_SAWTOOTH_KEY, 0); if (node) chain->AddNode(node); } }
/*************************************************************************** * GL-REPLICATE-MAP ***************************************************************************/ GlReplicateMap::GlReplicateMap(const GlReplicateMapAddOn* addon, const BMessage* config) : inherited(addon, config), mAddOn(addon) { bool added = false; GlChain* chain = VerifyChain(new GlChain(_MAP_KEY, GL_1D_IO, SZ(SZ_Map), this), &added); if (chain && added) { GlNode* node = GlGlobals().NewNode(GL_SINE_KEY, 0); if (node) chain->AddNode(node); } }
/*************************************************************************** * GL-REPLICATE ***************************************************************************/ GlReplicate::GlReplicate(const GlReplicateAddOn* addon, const BMessage* config) : inherited(addon, config), mAddOn(addon) { VerifyChain(new GlChain(_MAP_KEY, GL_1D_IO, SZ(SZ_Map), this)); }
HRESULT DoGetBinExtensions(XIPCHAIN_SUMMARY *pExtChain, LPDWORD pdwSize) { DEBUGCHK(pdwXIPLoc != NOT_FIXEDUP); DEBUGCHK(pdwSize); PXIPCHAIN_ENTRY pMDDChain; XIPCHAIN_SUMMARY * pOSChain; DWORD dwNumOSEntries, dwCurEntry; HRESULT hr; DWORD *pNANDXIPLoc; MSMDD_LOG_PRINT((TEXT("[MSMDD: IN] ++DoGetBinExtensions()\r\n"))); hr = GetOSChain(&pOSChain, &dwNumOSEntries); if ( SUCCEEDED(hr) ) { #if 1 { UINT i; MSMDD_INF_PRINT((TEXT("[MSMDD: ] ====== pOSChain Info Print ======\r\n"))); for (i = 0; i < dwNumOSEntries; i ++) { MSMDD_INF_PRINT((TEXT("[MSMDD: ] \tpOSChain[%d].pvAddr =0x%X\r\n"), i, pOSChain[i].pvAddr)); MSMDD_INF_PRINT((TEXT("[MSMDD: ] \tpOSChain[%d].dwMaxLength =0x%X\r\n"), i, pOSChain[i].dwMaxLength)); MSMDD_INF_PRINT((TEXT("[MSMDD: ] \tpOSChain[%d].usOrder =0x%X\r\n"), i, pOSChain[i].usOrder)); MSMDD_INF_PRINT((TEXT("[MSMDD: ] \tpOSChain[%d].usFlags =0x%X\r\n"), i, pOSChain[i].usFlags)); } MSMDD_INF_PRINT((TEXT("[MSMDD: ] =================================\r\n"))); } #endif // // NOTE: we always put a copy of the MDD chain into the BINFS chain // that's just the way BINFS expects it, it always skips the first // entry assuming it's our chain bin // if ( pExtChain ) { memcpy(pExtChain, pOSChain, sizeof(pExtChain[0])); } dwCurEntry = 1; } else { MSMDD_LOG_PRINT((TEXT("[MSMDD:OUT] --DoGetBinExtensions()\r\n"))); return hr; } #if defined(_ORG_CODE_) if ( !VerifyChain(pOSChain, dwNumOSEntries) ) #else //_ORG_CODE_ if ( !VerifyChainInPocketStore(pOSChain, dwNumOSEntries) ) #endif //_ORG_CODE_ { // // the chains are inconsistent-- the kernel chain that's // being used is not in sync with the MDD chain // we don't want the system to boot with any regions // DEBUGCHK(0); MSMDD_ERR_PRINT((TEXT("[MSMDD:ERR] MDD Chain and OS chain are not matched!!!!\r\n"))); MSMDD_LOG_PRINT((TEXT("[MSMDD:OUT] --DoGetBinExtensions()\r\n"))); return HRESULT_FROM_WIN32(ERROR_INVALID_DATA); } pNANDXIPLoc = AllocXIPLoc(); if (0 == pNANDXIPLoc) { MSMDD_ERR_PRINT((TEXT("[MSMDD:ERR] AllocXIPLoc fail\r\n"))); MSMDD_LOG_PRINT((TEXT("[MSMDD:OUT] --DoGetBinExtensions()\r\n"))); return HRESULT_FROM_WIN32(ERROR_INVALID_DATA); } #if defined(_ORG_CODE_) pMDDChain = (PXIPCHAIN_ENTRY)(pdwXIPLoc + 1); #else //_ORG_CODE_ pMDDChain = (PXIPCHAIN_ENTRY)(pNANDXIPLoc + 1); #endif //_ORG_CODE_ for ( UINT i = 1; i < dwNumOSEntries; ++i ) { if ( pMDDChain[i-1].usFlags & ROMXIP_OK_TO_LOAD ) { if ( pExtChain ) { memcpy(&(pExtChain[dwCurEntry]), &(pOSChain[i]), sizeof(pExtChain[dwCurEntry])); pExtChain[dwCurEntry].usOrder = (USHORT)(dwCurEntry-1); // BINFS counts on this field } ++dwCurEntry; } } if ( !pExtChain ) { *pdwSize = dwCurEntry * sizeof(XIPCHAIN_SUMMARY); } FreeXIPLoc(pNANDXIPLoc); MSMDD_LOG_PRINT((TEXT("[MSMDD:OUT] --DoGetBinExtensions()\r\n"))); return S_OK; }