bool ZEmblemInterface::ReloadClanInfo(UINT nClanID) { EmblemInfoMapList::iterator Iterator; if ( !FindClanInfo( nClanID, &Iterator)) return false; ZEmblemInfoNode &EmblemNode = Iterator->second; char szFilePath[256]; if(!ZGetGameClient()->GetEmblemManager()->GetEmblemPathByCLID(nClanID,szFilePath)) return false; SAFE_DELETE(EmblemNode.m_pBitmapEmblem); #ifdef _PUBLISH MZFile::SetReadMode( MZIPREADFLAG_ZIP | MZIPREADFLAG_MRS | MZIPREADFLAG_MRS2 | MZIPREADFLAG_FILE ); #endif // 클랜ID 값을 이용하여 해당 비트맵을 메모리 캐쉬로 로드한다. MBitmapR2 *pBitmap = new MBitmapR2; pBitmap->Create("clanEmblem",RGetDevice(),szFilePath,false); EmblemNode.m_pBitmapEmblem = pBitmap; #ifdef _PUBLISH MZFile::SetReadMode( MZIPREADFLAG_MRS2 ); #endif return true; }
void MDrawContextR2::DrawEx(int tx1, int ty1, int tx2, int ty2, int tx3, int ty3, int tx4, int ty4) { MBitmapR2* pBitmap = (MBitmapR2*)m_pBitmap; if(pBitmap==NULL) return; _ASSERT(pBitmap->m_nTypeID==MINT_R2_CLASS_TYPE); MCOLOR color(0xFF, 0xFF, 0xFF, m_nOpacity); pBitmap->DrawEx((float)tx1+m_Origin.x, (float)ty1+m_Origin.y, (float)tx2+m_Origin.x, (float)ty2+m_Origin.y, (float)tx3+m_Origin.x, (float)ty3+m_Origin.y, (float)tx4+m_Origin.x, (float)ty4+m_Origin.y, color.GetARGB(), m_Effect); }
virtual MBitmap* OpenBitmap(const char* szName){ char aliasname[256]; char drive[_MAX_DRIVE],dir[_MAX_DIR],fname[_MAX_FNAME],ext[_MAX_EXT]; _splitpath(szName,drive,dir,fname,ext); sprintf(aliasname,"%s%s",fname,ext); MBitmapR2* pNew = new MBitmapR2; bool bRet = pNew->Create(aliasname, RGetDevice(), szName); if(bRet==false){ delete pNew; return NULL; } return pNew; }
MBitmap* GetItemThumbnailBitmap(MMatchItemDesc* pDesc) { // 아이템의 썸네일 파일을 로딩 if (!pDesc) return NULL; MBitmap* pBitmap = ZGetGameInterface()->GetItemThumbnailMgr()->Get(pDesc->m_nID); if (pBitmap) return pBitmap; char szAliasName[32]; char szFilePath[256]; sprintf(szAliasName, "%d", pDesc->m_nID); sprintf(szFilePath, "interface/itemicon%d.dds", pDesc->m_nID); MBitmapR2* pNewBitmap = new MBitmapR2; if (!pNewBitmap->Create(szAliasName, RGetDevice(), szFilePath)) { delete pNewBitmap; return NULL; } ZGetGameInterface()->GetItemThumbnailMgr()->Add(pDesc->m_nID, pNewBitmap); return pNewBitmap; }