//------------------------------------------------------------------------------ // // //------------------------------------------------------------------------------ #include "SunClientPrecompiledHeader.h" #include "SpecialTexutureInfoParser.h" #include //---------------------------------------------------------------------------- /** */ SpecialTexutureInfoParser::SpecialTexutureInfoParser() { } //---------------------------------------------------------------------------- /** */ SpecialTexutureInfoParser::~SpecialTexutureInfoParser() { } //---------------------------------------------------------------------------- /** */ VOID SpecialTexutureInfoParser::Release() { } VOID SpecialTexutureInfoParser::Init(const char* pack_file_name) // nullÀ̸é pack file¾ø´Â °Å´ç { } BOOL SpecialTexutureInfoParser::LoadScript( eSCRIPT_CODE ScriptCode, BOOL bReload ) { switch( ScriptCode ) { case SCRIPT_SPECIAL_TEXTURE: return _Load( bReload ); } return FALSE; } //---------------------------------------------------------------------------- /** */ BOOL SpecialTexutureInfoParser::_Load( BOOL bReload ) { char szID[5] = {0,}; int nRowSize = GetRowSize(); for( int nRow = 0; nRow < nRowSize; ++nRow ) { //1.TextureID strncpy(szID, GetDataString("TextureID",nRow),4); WzID TextureID = StrToWzID(szID); TextureTable::iterator it = m_DataTable.find(TextureID); if(it != m_DataTable.end()) { if(bReload == false) { FASSERT(!"µ¥ÀÌÅÍ¿¡ ¿À·ù°¡ ÀÖ½À´Ï´Ù."); } } else { std::pair ret = m_DataTable.insert(std::make_pair(TextureID, Specail_Texture())); assert(ret.second); it = ret.first; } Specail_Texture& dest = it->second; ZeroMemory(&dest, sizeof(dest)); dest.m_TextureID = TextureID; //2.FileName strncpy( dest.szFilename, GetDataString( "FileName", nRow ), MAX_FILE_NAME ); //3.HandleÃʱâÈ­(½ÇÁ¦·Îµå½Ã¿¡ ÀÓ½ÃÀúÀåµÈ´Ù) dest.hSpecialTexture = INVALID_HANDLE_VALUE; } return TRUE; }