ZCharacterViewList* ZIDLResource::GetCharacterViewList(MXmlElement& element) { MXmlElement childElement; char szBuf[4096]; MWidget* pParentWidget = GetParentWidget(element); ZCharacterViewList* pWidget = new ZCharacterViewList("", pParentWidget, pParentWidget); InsertWidget(element, pWidget); int iCount = element.GetChildNodeCount(); for (int i = 0; i < iCount; i++) { memset(szBuf, 0, sizeof(szBuf)); childElement = element.GetChildNode(i); childElement.GetTagName(szBuf); if(GetCommonWidgetProperty(pWidget, childElement, szBuf)) continue; if(!strcmp(szBuf, "ITEMWIDTH")){ int nWidth = 80; childElement.GetContents(&nWidth); pWidget->SetItemWidth(nWidth); } } return pWidget; }
void MQuestScenarioCatalogue::ParseNPCSetArray(MXmlElement& element, vector<int>& vec) { char szMaps[256]; memset(szMaps, 0, sizeof(szMaps)); MMatchQuest* pQuest = MMatchServer::GetInstance()->GetQuest(); element.GetContents(szMaps); int nLen = (int)strlen(szMaps); for (int i = 0; i < nLen; i += 4) { char szNPCSet[4]; memset(szNPCSet, 0, sizeof(szNPCSet)); for (int j = 0; j < 3; j++) { szNPCSet[j] = szMaps[i+j]; } // NPCSetCatalogue¿¡¼ ÇØ´ç NPCSet¸¦ ã´Â´Ù. MQuestNPCSetInfo* pNPCSetInfo = pQuest->GetNPCSetInfo(szNPCSet); if (pNPCSetInfo) { vec.push_back(pNPCSetInfo->nID); } else { // ¸Â´Â NPCSet°¡ ¾ø´Ù. _ASSERT(0); } } }
ZCharacterView* ZIDLResource::GetCharacterView(MXmlElement& element) { MXmlElement childElement; char szBuf[4096]; MWidget* pParentWidget = GetParentWidget(element); ZCharacterView* pWidget = new ZCharacterView("", pParentWidget, pParentWidget); InsertWidget(element, pWidget); int iCount = element.GetChildNodeCount(); for (int i = 0; i < iCount; i++) { memset(szBuf, 0, sizeof(szBuf)); childElement = element.GetChildNode(i); childElement.GetTagName(szBuf); GetCommonWidgetProperty(pWidget, childElement, szBuf); if(!strcmp(szBuf, "VISIBLEEQUIPMENT")){ bool bVisibleEquipment = false; childElement.GetContents(&bVisibleEquipment); pWidget->SetVisibleEquipment(bVisibleEquipment); } } return pWidget; }
ZScoreBoardFrame* ZIDLResource::GetScoreBoardFrame(MXmlElement& element) { MXmlElement childElement; char szBuf[4096]; MWidget* pParentWidget; MListener* pListener; MBFrameLook* pFrameLook = NULL; pListener = pParentWidget = GetParentWidget(element); ZScoreBoardFrame* pFrame = new ZScoreBoardFrame("", pParentWidget, pListener); InsertWidget(element, pFrame); int iCount = element.GetChildNodeCount(); for (int i = 0; i < iCount; i++) { memset(szBuf, 0, sizeof(szBuf)); childElement = element.GetChildNode(i); childElement.GetTagName(szBuf); if (GetCommonWidgetProperty(pFrame, childElement, szBuf)) continue; if (!strcmp(szBuf, "FRAMELOOK")) { char szItem[256]; memset(szItem, 0, sizeof(szItem)); childElement.GetContents(szItem); map<string, MBFrameLook*>::iterator itor = m_FrameLookMap.find(szItem); if (itor != m_FrameLookMap.end()) { pFrameLook = (MBFrameLook*)(*itor).second; pFrame->ChangeCustomLook((MFrameLook*)pFrameLook); } } } return pFrame; }
ZStageInfoBox* ZIDLResource::GetStageInfoBox(MXmlElement& element) { MXmlElement childElement; char szBuf[4096]; MWidget* pParentWidget = GetParentWidget(element); ZStageInfoBox* pWidget = new ZStageInfoBox("", pParentWidget, pParentWidget); InsertWidget(element, pWidget); int iCount = element.GetChildNodeCount(); for (int i = 0; i < iCount; i++) { memset(szBuf, 0, sizeof(szBuf)); childElement = element.GetChildNode(i); childElement.GetTagName(szBuf); if (GetCommonWidgetProperty(pWidget, childElement, szBuf)) continue; else if (!strcmp(szBuf, "STAGEINFOITEMLOOK")) { char szItem[256]; memset(szItem, 0, sizeof(szItem)); childElement.GetContents(szItem); map<string, MBListBoxLook*>::iterator itor = m_ListBoxLookMap.find(szItem); if (itor != m_ListBoxLookMap.end()) { MBListBoxLook* pListBoxLook = NULL; pListBoxLook = (*itor).second; // pWidget->ChangeCustomLook(pListBoxLook); pWidget->SetLook(pListBoxLook); } } } return pWidget; }
ZMeshView* ZIDLResource::GetMeshView(MXmlElement& element) { MXmlElement childElement; char szBuf[4096]; MWidget* pParentWidget = GetParentWidget(element); ZMeshView* pWidget = new ZMeshView("", pParentWidget, pParentWidget); InsertWidget(element, pWidget); int iCount = element.GetChildNodeCount(); for (int i = 0; i < iCount; i++) { memset(szBuf, 0, sizeof(szBuf)); childElement = element.GetChildNode(i); childElement.GetTagName(szBuf); GetCommonWidgetProperty(pWidget, childElement, szBuf); if (!strcmp(szBuf, "BUTTONLOOK")) { char szItem[256]; memset(szItem, 0, sizeof(szItem)); childElement.GetContents(szItem); map<string, MBButtonLook*>::iterator itor = m_ButtonLookMap.find(szItem); if (itor != m_ButtonLookMap.end()) { pWidget->ChangeCustomLook((MButtonLook*)(*itor).second); } pWidget->SetLook(true); } } return pWidget; }
bool MSpawnManager::ReadSpawnPosition(char* pszMapFile) { MXmlDocument aXml; aXml.Create(); if (!aXml.LoadFromFile(pszMapFile)) { aXml.Destroy(); return false; } char szBuf[65535]; ZeroMemory(szBuf, 65535); MXmlElement aRoot; aRoot = aXml.GetDocumentElement(); int nTotalRead = 0; int nSpawnListCount = aRoot.GetChildNodeCount(); for (int i=0; i<nSpawnListCount; i++) { MXmlElement aSpawnList = aRoot.GetChildNode(i); aSpawnList.GetTagName(szBuf); if (szBuf[0] == '#') continue; if (!stricmp(szBuf, MTOK_SPAWNPOSITIONLIST)) { int nSpawnCount = aSpawnList.GetChildNodeCount(); for (int j=0; j<nSpawnCount; j++) { MXmlElement aSpawn = aSpawnList.GetChildNode(j); aSpawn.GetTagName(szBuf); if (szBuf[0] == '#') continue; if (!strcmp(szBuf, MTOK_SPAWNPOSITION)) { char szSpawnName[128]; ZeroMemory(szSpawnName, 128); rvector Pos; if (!aSpawn.GetAttribute(szSpawnName, MTOK_NAME)) continue; int nFieldCount = aSpawn.GetChildNodeCount(); for (int k=0; k<nFieldCount; k++) { MXmlElement aField = aSpawn.GetChildNode(k); aField.GetTagName(szBuf); if (szBuf[0] == '#') continue; if (!stricmp(szBuf, MTOK_POSITION)) { aField.GetContents(szBuf); sscanf(szBuf, "%f %f %f", &Pos.x, &Pos.y, &Pos.z); } } MSpawnData* pSpawnData = FindSpawnByName(szSpawnName); if (pSpawnData) { LOG("Duplicated spawn name '%s' found in '%s' file", szSpawnName, pszMapFile); } else { AddSpawnData(szSpawnName, Pos); nTotalRead++; } } } } // SPAWNLIST } aXml.Destroy(); LOG("Read %d spawn position in map '%s'", nTotalRead, pszMapFile); return true; }
bool MSpawnManager::ReadSpawnData(char* pszSpawnFile) { MXmlDocument aXml; aXml.Create(); if (!aXml.LoadFromFile(pszSpawnFile)) { aXml.Destroy(); return false; } char szBuf[65535]; ZeroMemory(szBuf, 65535); MXmlElement aRoot; aRoot = aXml.GetDocumentElement(); int nTotalRead = 0; int nSpawnCount = aRoot.GetChildNodeCount(); for (int i=0; i<nSpawnCount; i++) { MXmlElement aSpawn = aRoot.GetChildNode(i); aSpawn.GetTagName(szBuf); if (szBuf[0] == '#') continue; if (!stricmp(szBuf, MTOK_SPAWNDATA)) { char szSpawnName[128]; ZeroMemory(szSpawnName, 128); if (!aSpawn.GetAttribute(szSpawnName, "name")) continue; int nObjectID = 0; int nMaxCount = 0; int nRespawnTime = 0; int nFieldCount = aSpawn.GetChildNodeCount(); for (int j=0; j<nFieldCount; j++) { MXmlElement aField = aSpawn.GetChildNode(j); aField.GetTagName(szBuf); if (szBuf[0] == '#') continue; if (!stricmp(szBuf, MTOK_OBJECTID)) aField.GetContents(&nObjectID); else if (!stricmp(szBuf, MTOK_MAXCOUNT)) aField.GetContents(&nMaxCount); else if (!stricmp(szBuf, MTOK_RESPAWNTIME)) aField.GetContents(&nRespawnTime); } MSpawnData* pSpawnData = FindSpawnByName(szSpawnName); if (pSpawnData) { pSpawnData->SetObjID(nObjectID); pSpawnData->SetMaxCount(nMaxCount); pSpawnData->SetRespawnTime(nRespawnTime); nTotalRead++; } else { LOG("SpawnData '%s' has no SpawnPosition. (%s)", szSpawnName, pszSpawnFile); } } } aXml.Destroy(); LOG("Read %d spawn data in file '%s'", nTotalRead, pszSpawnFile); return true; }
bool MEmblemMgr::LoadCache() { MXmlDocument xmlDoc; xmlDoc.Create(); if (!xmlDoc.LoadFromFile(GetEmblemDataFile())) { xmlDoc.Destroy(); return false; } MXmlElement rootElement,emblemElement,childElement; char szTagName[256]; rootElement = xmlDoc.GetDocumentElement(); int iCount = rootElement.GetChildNodeCount(); for (int i = 0; i < iCount; i++) { emblemElement = rootElement.GetChildNode(i); emblemElement.GetTagName(szTagName); if (szTagName[0] == '#') continue; if (!strcmp(szTagName, MTOK_EMBLEM)) { int nCLID = -1; char szURL[256]=""; int nChecksum = -1; time_t tmLastUsed = 0; int nEmblemChildCount = emblemElement.GetChildNodeCount(); MXmlElement chrElement; for (int j = 0; j < nEmblemChildCount; j++) { chrElement = emblemElement.GetChildNode(j); chrElement.GetTagName(szTagName); if (szTagName[0] == '#') continue; if (!strcmp(szTagName, MTOK_EMBLEM_CLID)) { chrElement.GetContents(&nCLID); } else if (!strcmp(szTagName, MTOK_EMBLEM_URL)) { chrElement.GetContents(szURL); } else if (!strcmp(szTagName, MTOK_EMBLEM_CHECKSUM)) { chrElement.GetContents(&nChecksum); } } if ((nCLID != -1) && (szURL[0] != 0) && (nChecksum != -1)) { emblemElement.GetChildContents((int*)&tmLastUsed, MTOK_EMBLEM_TIMELASTUSED); // 없어도 로드되게 RegisterEmblem(nCLID, szURL, nChecksum, tmLastUsed); } } } xmlDoc.Destroy(); return true; }
ZPlayerListBox* ZIDLResource::GetPlayerListBox( MXmlElement& element ) { MXmlElement childElement; char szBuf[4096]; char szAttr[4096]; MWidget* pParentWidget = GetParentWidget(element); ZPlayerListBox* pWidget = new ZPlayerListBox("", pParentWidget, pParentWidget); pWidget->SetListener(pWidget); InsertWidget(element, pWidget); int iCount = element.GetChildNodeCount(); bool bMode1 = false; for (int i = 0; i < iCount; i++) { memset(szBuf, 0, sizeof(szBuf)); childElement = element.GetChildNode(i); childElement.GetTagName(szBuf); if(GetCommonWidgetProperty(pWidget, childElement, szBuf)) continue; /* else if( strcmp(szBuf, "BITMAP") == 0) { childElement.GetAttribute(szAttr, "type" ); if( strcmp(szAttr,"slot") == 0) { childElement.GetContents(szAttr); MBitmap* pBitmap =GetBitmap(childElement); pWidget->SetBitmap(pBitmap); } }*/ else if( strcmp(szBuf, "SIZE" ) == 0 ) { childElement.GetAttribute(szAttr, "type"); if( strcmp(szAttr,"width") == 0 ) { float temp; childElement.GetContents(&temp); pWidget->SetWidth( temp ); } else if( strcmp(szAttr,"height") == 0 ) { float temp; childElement.GetContents(&temp); pWidget->SetHeight( temp ); } } else if(strcmp(szBuf, "MODE1" ) == 0 ) { bMode1 = true; } } if(bMode1==false) pWidget->InitUI(ZPlayerListBox::PLAYERLISTMODE_CHANNEL); else pWidget->InitUI(ZPlayerListBox::PLAYERLISTMODE_STAGE); return pWidget; }
ZRoomListBox* ZIDLResource::GetRoomListBox( MXmlElement& element ) { MXmlElement childElement; char szBuf[4096]; char szAttr[4096]; MWidget* pParentWidget = GetParentWidget(element); ZRoomListBox* pWidget = new ZRoomListBox("", pParentWidget, pParentWidget); InsertWidget(element, pWidget); int iCount = element.GetChildNodeCount(); for (int i = 0; i < iCount; i++) { memset(szBuf, 0, sizeof(szBuf)); childElement = element.GetChildNode(i); childElement.GetTagName(szBuf); if(GetCommonWidgetProperty(pWidget, childElement, szBuf)) continue; else if( strcmp(szBuf, "BITMAP") == 0) { childElement.GetAttribute(szAttr, "type" ); if( strcmp(szAttr,"frame") == 0) { pWidget->SetFrameImage( GetBitmap(childElement)); } else if( strcmp(szAttr, "back") == 0 ) { childElement.GetContents(szAttr); MBitmap* pBitmap =GetBitmap(childElement); if( pBitmap != 0 ) pWidget->SetBannerImage( szAttr, pBitmap); } else if( stricmp( szAttr,"icon" )==0 ) { int mode; childElement.GetAttribute(&mode, "mode"); childElement.GetContents(szAttr); MBitmap* pBitmap = GetBitmap(childElement); if( pBitmap != 0 ) pWidget->SetIconImage( (MMATCH_GAMETYPE)mode, pBitmap ); } } else if ( strcmp(szBuf, "SIZE") == 0 ) { childElement.GetAttribute(szAttr, "type" ); if( strcmp(szAttr,"width") == 0) { float w; childElement.GetContents( &w ); pWidget->SetWidth( w ); } if( strcmp(szAttr,"height") == 0) { float h; childElement.GetContents( &h ); pWidget->SetHeight( h ); } } } return pWidget; }
ZShopEquipListbox* ZIDLResource::GetEquipmentListBox(MXmlElement& element) { MXmlElement childElement; char szBuf[4096]; MWidget* pParentWidget = GetParentWidget(element); ZShopEquipListbox* pWidget = new ZShopEquipListbox("", pParentWidget, pParentWidget); pWidget->m_FontAlign = MAM_VCENTER; InsertWidget(element, pWidget); int iCount = element.GetChildNodeCount(); for (int i = 0; i < iCount; i++) { memset(szBuf, 0, sizeof(szBuf)); childElement = element.GetChildNode(i); childElement.GetTagName(szBuf); if (GetCommonWidgetProperty(pWidget, childElement, szBuf)) continue; else if (!strcmp(szBuf, "LISTBOXLOOK")) { char szItem[256]; memset(szItem, 0, sizeof(szItem)); childElement.GetContents(szItem); map<string, MBMultiColListBoxLook*>::iterator itor = m_MultiColListBoxLookMap.find(szItem); if (itor != m_MultiColListBoxLookMap.end()) { MBMultiColListBoxLook* pListBoxLook = NULL; pListBoxLook = (*itor).second; pWidget->ChangeCustomLook(pListBoxLook); } }else if (!strcmp(szBuf, "SCROLLBARLOOK")) { char szItem[256]; memset(szItem, 0, sizeof(szItem)); childElement.GetContents(szItem); map<string, MBScrollBarLook*>::iterator itor = m_ScrollBarLookMap.find(szItem); if (itor != m_ScrollBarLookMap.end()) pWidget->GetScrollBar()->ChangeCustomLook((*itor).second); }else if (!strcmp(szBuf, "ARROWLOOK")) { char szItem[256]; memset(szItem, 0, sizeof(szItem)); childElement.GetContents(szItem); map<string, MBArrowLook*>::iterator itor = m_ArrowLookMap.find(szItem); if (itor != m_ArrowLookMap.end()) pWidget->GetScrollBar()->ChangeCustomArrowLook((*itor).second); }else if (!strcmp(szBuf, "THUMBLOOK")) { char szItem[256]; memset(szItem, 0, sizeof(szItem)); childElement.GetContents(szItem); map<string, MBThumbLook*>::iterator itor = m_ThumbLookMap.find(szItem); if (itor != m_ThumbLookMap.end()) pWidget->GetScrollBar()->ChangeCustomThumbLook((*itor).second); }else if (!strcmp(szBuf, "NUMCOLUMN")) { char szItem[256]; memset(szItem, 0, sizeof(szItem)); childElement.GetContents(szItem); int numColumn = atoi(szItem); if (numColumn > 0) pWidget->SetNumColumn(numColumn); } } return pWidget; }
bool ZConfiguration::LoadConfig(const char* szFileName) { MXmlDocument xmlConfig; MXmlElement parentElement, serverElement, bindsElement; MXmlElement childElement; mlog( "Load Config from file : %s", szFileName ); xmlConfig.Create(); if (!xmlConfig.LoadFromFile(szFileName)) { mlog( "- FAIL\n"); xmlConfig.Destroy(); return false; } mlog( "- SUCCESS\n"); parentElement = xmlConfig.GetDocumentElement(); int iCount = parentElement.GetChildNodeCount(); if (!parentElement.IsEmpty()) { if (parentElement.FindChildNode( ZTOK_SERVER, &serverElement)) { serverElement.GetChildContents( m_szServerIP, ZTOK_IP); serverElement.GetChildContents( &m_nServerPort, ZTOK_PORT); } if (parentElement.FindChildNode(ZTOK_VIDEO, &childElement)) { childElement.GetChildContents(&m_Video.nWidth, ZTOK_VIDEO_WIDTH); childElement.GetChildContents(&m_Video.nHeight, ZTOK_VIDEO_HEIGHT); childElement.GetChildContents(&m_Video.nColorBits, ZTOK_VIDEO_COLORBITS); childElement.GetChildContents(&m_Video.bFullScreen, ZTOK_VIDEO_FULLSCREEN); childElement.GetChildContents(&m_Video.nGamma, ZTOK_VIDEO_GAMMA); childElement.GetChildContents(&m_Video.bReflection, ZTOK_VIDEO_REFLECTION ); childElement.GetChildContents(&m_Video.bLightMap, ZTOK_VIDEO_LIGHTMAP ); childElement.GetChildContents(&m_Video.bDynamicLight, ZTOK_VIDEO_DYNAMICLIGHT ); childElement.GetChildContents(&m_Video.bShader, ZTOK_VIDEO_SHADER ); childElement.GetChildContents(&m_Video.nCharTexLevel, ZTOK_VIDEO_CHARTEXLEVEL ); childElement.GetChildContents(&m_Video.nMapTexLevel, ZTOK_VIDEO_MAPTEXLEVEL ); RBspObject::SetTextureRenderOnOff(m_Video.nMapTexLevel != 7); childElement.GetChildContents(&m_Video.nEffectLevel, ZTOK_VIDEO_EFFECTLEVEL ); childElement.GetChildContents(&m_Video.nTextureFormat, ZTOK_VIDEO_TEXTUREFORMAT ); childElement.GetChildContents(&m_Video.bTerrible, "NHARDWARETNL"); childElement.GetChildContents(&m_MovingPicture.iResolution, ZTOK_MOVINGPICTURE_RESOLUTION ); childElement.GetChildContents(&m_MovingPicture.iFileSize, ZTOK_MOVINGPICTURE_FILESIZE ); } if (parentElement.FindChildNode(ZTOK_AUDIO, &childElement)) { childElement.GetChildContents(&m_Audio.bBGMEnabled, ZTOK_AUDIO_BGM_ENABLED); childElement.GetChildContents(&m_Audio.fBGMVolume, ZTOK_AUDIO_BGM_VOLUME); childElement.GetChildContents(&m_Audio.fEffectVolume, ZTOK_AUDIO_EFFECT_VOLUME); childElement.GetChildContents(&m_Audio.bBGMMute, ZTOK_AUDIO_BGM_MUTE); childElement.GetChildContents(&m_Audio.bEffectMute, ZTOK_AUDIO_EFFECT_MUTE); childElement.GetChildContents(&m_Audio.b8BitSound, ZTOK_AUDIO_8BITSOUND); childElement.GetChildContents(&m_Audio.bInverse, ZTOK_AUDIO_INVERSE); childElement.GetChildContents(&m_Audio.bHWMixing, ZTOK_AUDIO_HWMIXING); childElement.GetChildContents(&m_Audio.bHitSound, ZTOK_AUDIO_HITSOUND); childElement.GetChildContents(&m_Audio.bNarrationSound, ZTOK_AUDIO_NARRATIONSOUND); childElement.GetChildContents( &m_Audio.bCustomMusic, ZTOK_AUDIO_CUSTOMMUSIC ); //childElement.GetChildContents(&m_Audio.b3DSound, ZTOK_AUDIO_3D_SOUND); m_Audio.b3DSound = true; } if (parentElement.FindChildNode(ZTOK_MOUSE, &childElement)) { childElement.GetChildContents(&m_Mouse.fSensitivity, ZTOK_MOUSE_SENSITIVITY); childElement.GetChildContents(&m_Mouse.bInvert, ZTOK_MOUSE_INVERT); } if (parentElement.FindChildNode(ZTOK_JOYSTICK, &childElement)) { childElement.GetChildContents(&m_Joystick.fSensitivity, ZTOK_JOYSTICK_SENSITIVITY); childElement.GetChildContents(&m_Joystick.bInvert, ZTOK_JOYSTICK_INVERT); } if (parentElement.FindChildNode(ZTOK_KEYBOARD, &childElement)) { for(int i=0; i<ZACTION_COUNT; i++){ char szItemName[256]; strcpy(szItemName, m_Keyboard.ActionKeys[i].szName); _strupr(szItemName); MXmlNode keyNode; if (childElement.FindChildNode(szItemName, &keyNode)) { MXmlElement actionKeyElement = keyNode; const int ID_UNDEFINED = -2; int nKey; actionKeyElement.GetAttribute(&nKey,"alt",ID_UNDEFINED); // "alt"에 값이 없다면 ID_UNDEFINED 를 세팅 if(nKey!=ID_UNDEFINED) // "alt"에 값이 없다면 스킵 m_Keyboard.ActionKeys[i].nVirtualKeyAlt = nKey; actionKeyElement.GetContents(&m_Keyboard.ActionKeys[i].nVirtualKey); } } } if( parentElement.FindChildNode(ZTOK_MACRO, &childElement) ) { //char buf[8][256]; //childElement.GetChildContents(buf[0], ZTOK_MACRO_F1, 255); //childElement.GetChildContents(buf[1], ZTOK_MACRO_F2, 255); //childElement.GetChildContents(buf[2], ZTOK_MACRO_F3, 255); //childElement.GetChildContents(buf[3], ZTOK_MACRO_F4, 255); //childElement.GetChildContents(buf[4], ZTOK_MACRO_F5, 255); //childElement.GetChildContents(buf[5], ZTOK_MACRO_F6, 255); //childElement.GetChildContents(buf[6], ZTOK_MACRO_F7, 255); //childElement.GetChildContents(buf[7], ZTOK_MACRO_F8, 255); //for (int i = 0; i < 8; i++) //{ // strcpy(m_Macro.szMacro[i], ZGetStringResManager()->GetStringFromXml(buf[i])); //} // 여기선 읽기만 함. // string.xml을 읽은 후 다시 컨버팅 함. // config.xml에 있는 lcale정보로 string.xml의 국가를 결정하기 때문에 이 부분은 바로 처리할 수 없음. childElement.GetChildContents(m_Macro.szMacro[0], ZTOK_MACRO_F1, 255); childElement.GetChildContents(m_Macro.szMacro[1], ZTOK_MACRO_F2, 255); childElement.GetChildContents(m_Macro.szMacro[2], ZTOK_MACRO_F3, 255); childElement.GetChildContents(m_Macro.szMacro[3], ZTOK_MACRO_F4, 255); childElement.GetChildContents(m_Macro.szMacro[4], ZTOK_MACRO_F5, 255); childElement.GetChildContents(m_Macro.szMacro[5], ZTOK_MACRO_F6, 255); childElement.GetChildContents(m_Macro.szMacro[6], ZTOK_MACRO_F7, 255); childElement.GetChildContents(m_Macro.szMacro[7], ZTOK_MACRO_F8, 255); } if (parentElement.FindChildNode(ZTOK_ETC, &childElement)) { childElement.GetChildContents(&m_Etc.nNetworkPort1, ZTOK_ETC_NETWORKPORT1); childElement.GetChildContents(&m_Etc.nNetworkPort2, ZTOK_ETC_NETWORKPORT2); childElement.GetChildContents(&m_Etc.bBoost, ZTOK_ETC_BOOST); childElement.GetChildContents(&m_Etc.bRejectNormalChat, ZTOK_ETC_REJECT_NORMALCHAT); childElement.GetChildContents(&m_Etc.bRejectTeamChat, ZTOK_ETC_REJECT_TEAMCHAT); childElement.GetChildContents(&m_Etc.bRejectClanChat, ZTOK_ETC_REJECT_CLANCHAT); childElement.GetChildContents(&m_Etc.bRejectWhisper, ZTOK_ETC_REJECT_WHISPER); childElement.GetChildContents(&m_Etc.bRejectInvite, ZTOK_ETC_REJECT_INVITE); childElement.GetChildContents(&m_Etc.nCrossHair, ZTOK_ETC_CROSSHAIR); childElement.GetChildContents(&m_Etc.nFrameLimit_perSecond, ZTOK_ETC_FRAMELIMIT_PERSECOND); //m_Etc.szLanguage[0] = 0; #ifdef _MULTILANGUAGE #ifdef LOCALE_NHNUSA SetSelectedLanguageIndex( g_LanguageSettingForNHNUSA.GetLanguageSetting()); #else // 기본적으로는 게임내부 옵션에서 선택한 언어를 config에 저장했던 것을 로딩 childElement.GetChildContents( m_Etc.szLanguage, ZTOK_ETC_LANGUAGE, 32); #endif #endif //_MULTILANGUAGE } ValidateSelectedLanguage(); /* if (parentElement.FindChildNode(ZTOK_BINDS, &bindsElement)) { for(int i=0;i<bindsElement.GetChildNodeCount();i++) { char tagname[256]; MXmlElement bind=bindsElement.GetChildNode(i); bind.GetTagName(tagname); if(strcmp(tagname,ZTOK_BIND)==0) { char key[256],command[256]; int ctrl,alt,shift; bind.GetAttribute(key,ZTOK_KEY); bind.GetAttribute(&ctrl,ZTOK_KEY_CTRL); bind.GetAttribute(&alt,ZTOK_KEY_ALT); bind.GetAttribute(&shift,ZTOK_KEY_SHIFT); bind.GetContents(command); ZHOTKEY *photkey=new ZHOTKEY; photkey->nModifier=0; if(ctrl) photkey->nModifier|=MOD_CONTROL; if(alt) photkey->nModifier|=MOD_ALT; if(shift) photkey->nModifier|=MOD_SHIFT; photkey->nVirtKey=GetVirtKey(key); photkey->command=string(command); int nHotkeyID=MRegisterHotKey(photkey->nModifier,photkey->nVirtKey); m_HotKeys.insert(ZHOTKEYS::value_type(nHotkeyID,photkey)); } } } */ } //if( m_Video.bTerrible ) //{ // //m_Video.nCharTexLevel = 2; // //m_Video.nMapTexLevel = 2; // //m_Video.nEffectLevel = 2; // //m_Video.bDynamicLight = false; // //m_Video.bReflection = false; //} //else //{ // m_Video.bLightMap = false; // 최하위 버전이 아닐 경우 라이트 맵을 끄지 못한다 //} xmlConfig.Destroy(); return true; }