static CMap *ReadCMap(InputStream *pSource) { CMap *pCMap; CMapReader *pReader; pCMap = new CMap(); pReader = new CMapReader(pCMap); pReader->Read(pSource); delete pReader; return pCMap; }
CMapReader *sw_maprd_read(const char *_szFilePath) { FILE *fp; fp=fopen(_szFilePath,"rb"); if(fp == 0) { return NULL; } CMapReader *mr = new CMapReader(); if(mr->Read(fp) == true) { fclose(fp); return mr; }else { fclose(fp); delete mr; return NULL; } }