本文整理汇总了C++中KGLOG_PROCESS_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ KGLOG_PROCESS_ERROR函数的具体用法?C++ KGLOG_PROCESS_ERROR怎么用?C++ KGLOG_PROCESS_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了KGLOG_PROCESS_ERROR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KG_ASSERT_EXIT
int KRLMissile::Start()
{
int nRetCode = false;
int nResult = false;
double fTime = 0.0;
KG_ASSERT_EXIT(m_pRLScene);
nRetCode = m_RepresentMissile.Start(g_pRL->m_fTime);
KGLOG_PROCESS_ERROR(nRetCode);
nResult = true;
Exit0:
if (!nResult)
{
}
return nResult;
}
示例2: UnInit
HRESULT KG3DTerrainDetailMaterialMgr::LoadFromInformationBuffer(DWORD dwLength,KG3DMemoryFile* pFile)//modify by huangjinshou 2008-6-11
{
UnInit();
//pFile->Reset();
DWORD dwVersion = 0;
pFile->read(&dwVersion,sizeof(DWORD));
BYTE byNum = 0;
pFile->read(&byNum,sizeof(BYTE));//m_byteCurrentTextureIndex
pFile->read(&m_byteCurrentMaterialIndex,sizeof(BYTE));
for (BYTE i=0;i<byNum;i++)
{
BYTE mask = 0;
pFile->read(&mask,sizeof(BYTE));
if(mask)
{
KG3DTerrainDetailTexture* pTexture = new KG3DTerrainDetailTexture();//m_szDetailTexture[i] =
pTexture->LoadFromInformationBuffer(pFile);
m_mapDetailTexture.insert(pair<BYTE,KG3DTerrainDetailTexture*>(pTexture->m_byteIndex,pTexture));
}
}
for (int i=0;i<256;i++)
{
BYTE mask = 1;
pFile->read(&mask,sizeof(BYTE));
if(mask)
{
KG3DTerrainDetailMaterial* pMtl = m_szDetailMaterial[i] = new KG3DTerrainDetailMaterial();
pMtl->LoadFromInformationBuffer(pFile);
}
}
KGLOG_PROCESS_ERROR( dwLength == pFile->GetPos());
return S_OK;
Exit0:
return E_FAIL;
}
示例3: KGLOG_PROCESS_ERROR
int KItem::LuaGetTemporaryEnchantAttrib(Lua_State* L)
{
int nFirst = true;
int nResult = 0;
int nIndex = 1;
KGLOG_PROCESS_ERROR(Lua_GetTopIndex(L) == 0);
KG_PROCESS_ERROR(m_pTemporaryEnchant);
KG_PROCESS_ERROR(m_pTemporaryEnchant->pAttribute);
for (KAttribute* pAttribute = m_pTemporaryEnchant->pAttribute; pAttribute; pAttribute = pAttribute->pNext)
{
if (pAttribute->nKey != atInvalid)
{
if (nFirst)
{
Lua_NewTable(L);
nFirst = false;
}
Lua_PushNumber(L, nIndex);
nIndex++;
Lua_NewTable(L);
Lua_PushString(L, "nID");
Lua_PushNumber(L, pAttribute->nKey);
Lua_SetTable(L, -3);
Lua_PushString(L, "nValue1");
Lua_PushNumber(L, pAttribute->nValue1);
Lua_SetTable(L, -3);
Lua_PushString(L, "nValue2");
Lua_PushNumber(L, pAttribute->nValue2);
Lua_SetTable(L, -3);
Lua_SetTable(L, -3);
}
}
if (!nFirst)
nResult = 1;
Exit0:
return nResult;
}
示例4: LuaResetMap
int LuaResetMap(Lua_State* L)
{
int nResult = 0;
BOOL bRetCode = false;
int nTopIndex = 0;
DWORD dwPlayerID = ERROR_ID;
DWORD dwMapID = 0;
int nCopySN = 0;
int i = 1;
std::vector<DWORD> vecFailedMap;
nTopIndex = Lua_GetTopIndex(L);
KGLOG_PROCESS_ERROR(nTopIndex == 3);
dwPlayerID = (DWORD)Lua_ValueToNumber(L, 1);
dwMapID = (DWORD)Lua_ValueToNumber(L, 2);
nCopySN = (int)Lua_ValueToNumber(L, 3);
if (dwMapID == 0)
{
g_pSO3GameCenter->m_MapManager.ResetAllMap(dwPlayerID, vecFailedMap);
}
else
{
bRetCode = g_pSO3GameCenter->m_MapManager.ResetMap(dwPlayerID, dwMapID, nCopySN);
if (!bRetCode)
{
vecFailedMap.push_back(dwMapID);
}
}
Lua_NewTable(L);
for (std::vector<DWORD>::iterator it = vecFailedMap.begin(); it != vecFailedMap.end(); ++it, ++i)
{
Lua_PushNumber(L, i);
Lua_PushNumber(L, *it);
Lua_SetTable(L, -3);
}
nResult = 1;
Exit0:
return nResult;
}
示例5: KGLOG_PROCESS_ERROR
void KTestGenerateList::TestGenerateFail()
{
int nResult = false;
int nRetCode = false;
int nCompareResult = 0;
errno_t nErr = 0;
KZipFileInfo** ppZipFileList = NULL;
KVersionParser Parser;
TCHAR szTestRes[MAX_PATH];
nRetCode = KTestCommon::PrepareTestResoure(AUTOUPDATE_ENTRY_1);
KGLOG_PROCESS_ERROR(nRetCode != -1);
//输入更新列表和不在列表范围内的版本号,无法生成下载列表
nRetCode = _sntprintf(szTestRes, MAX_PATH, _T("%s\\%s"), g_szTestingSpaceDir, AUTOUPDATE_ENTRY_1);
KGLOG_PROCESS_ERROR(nRetCode != -1);
szTestRes[MAX_PATH - 1] = _T('\0');
nRetCode = Parser.Parse(szTestRes, WRONG_VERSION);//1.0.8.1200
KGLOG_PROCESS_ERROR(nRetCode == false);
KGLogPrintf(KGLOG_INFO, "成功验证\"无法生成下载列表\"");
ppZipFileList = Parser.GetPackList();
KGLOG_PROCESS_ERROR(ppZipFileList[0] == NULL);
//验证其它数据
KGLOG_PROCESS_ERROR(Parser.NeedUpdate() == TRUE);
KGLOG_PROCESS_ERROR(Parser.CanDownloadPack() == FALSE);
nCompareResult = _tcsncmp(Parser.GetBeginVersion().c_str(), WRONG_VERSION, MAX_PATH);//1.0.8.1200
KGLOG_PROCESS_ERROR(nCompareResult == 0);
nCompareResult = _tcsncmp(Parser.GetLatestVersion().c_str(), LATEST_VERSION, MAX_PATH);//1.0.8.1353
KGLOG_PROCESS_ERROR(nCompareResult == 0);
nErr = ::_taccess_s(szTestRes, 0);
KGLOG_PROCESS_ERROR(nErr == ENOENT);
nResult = true;
Exit0:
Parser.CleanUp();
CPPUNIT_ASSERT(nResult);
}
示例6: Lua_GetTopIndex
int KTeamClient::LuaSetTeamDistributeMan(Lua_State* L)
{
int nResult = 0;
int nTopIndex = 0;
DWORD dwNewDistributeMan = ERROR_ID;
nTopIndex = Lua_GetTopIndex(L);
KGLOG_PROCESS_ERROR(nTopIndex == 1);
dwNewDistributeMan = (DWORD)Lua_ValueToNumber(L, 1);
KG_PROCESS_ERROR(m_dwAuthority[tatDistribute] != dwNewDistributeMan);
g_PlayerClient.DoTeamChangeAuthorityRequest(tatDistribute, dwNewDistributeMan);
nResult = 0;
Exit0:
return nResult;
}
示例7: assert
BOOL KLogClient::LogPlayerJoinTeam(KPlayer* pPlayer, KTeam* pTeam)
{
BOOL bResult = false;
int nRetCode = 0;
size_t uMemberListSize = 0;
char szMemberList[_NAME_LEN * MAX_TEAM_GROUP_NUM * MAX_PLAYER_PER_GROUP]; // 能包含所有成员的名字。
assert(pPlayer);
assert(pTeam);
szMemberList[0] = '\0';
for (int i = 0; i < pTeam->nGroupNum; i++)
{
for (
KTEAM_MEMBER_LIST::iterator it = pTeam->MemberGroup[i].MemberList.begin();
it != pTeam->MemberGroup[i].MemberList.end(); ++it
)
{
if (it->dwMemberID == pPlayer->m_dwID)
continue;
nRetCode = snprintf(szMemberList + uMemberListSize, sizeof(szMemberList), "%s,", it->szRoleName);
KGLOG_PROCESS_ERROR(nRetCode > 0 && nRetCode <= sizeof(szMemberList));
uMemberListSize += strlen(it->szRoleName) + sizeof(',');
}
}
if (uMemberListSize > 0)
{
szMemberList[uMemberListSize - 1] = '\0'; // 去掉最后一个','
}
nRetCode = LogPlayerAction(
PLAYER_ACTION_JOIN_TEAM, 100, "JOIN_TEAM", pPlayer->m_szAccount, pPlayer->m_szName,
uMemberListSize, (BYTE*)szMemberList
);
KG_PROCESS_ERROR(nRetCode);
bResult = true;
Exit0:
return bResult;
}
示例8: KGLOG_PROCESS_ERROR
KItemInfo* KItemManager::GetItemInfo(int nVersion, DWORD dwTabType, DWORD dwIndex)
{
KItemInfo* pRetItemInfo = NULL;
KGLOG_PROCESS_ERROR(nVersion >= 0 && nVersion <= CURRENT_ITEM_VERSION);
pRetItemInfo = m_pItemLib[nVersion].GetItemInfo(dwTabType, dwIndex);
Exit0:
if (pRetItemInfo == NULL)
{
KGLogPrintf(
KGLOG_ERR,
"Get ItemInfo failed! nVersion : %d, dwTabType : %d, dwTabIndex : %d\n",
nVersion, dwTabType, dwIndex
);
}
return pRetItemInfo;
}
示例9: KGLOG_PROCESS_ERROR
BOOL KBattleFieldManager::JoinBattleTeam(DWORD dwRoleID, DWORD dwTeamID)
{
BOOL bResult = false;
KRole* pRole = NULL;
pRole = g_pSO3GameCenter->m_RoleManager.GetRole(dwRoleID);
KGLOG_PROCESS_ERROR(pRole);
if (pRole->m_dwSystemTeamID != ERROR_ID)
{
g_pSO3GameCenter->m_TeamCenter.DelMember(pRole->m_dwSystemTeamID, pRole->m_dwPlayerID);
}
g_pSO3GameCenter->m_TeamCenter.AddMember(dwTeamID, dwRoleID);
bResult = true;
Exit0:
return bResult;
}
示例10: GetNameID
// 直接设置某项统计数据的值,慎用
BOOL KStatDataManager::SetDataValue(const char cszName[], int64_t nValue)
{
BOOL bResult = false;
int nRetCode = 0;
int nNameID = 0;
uint64_t uNewDataID = 0;
nNameID = GetNameID(cszName);
KGLOG_PROCESS_ERROR(nNameID != 0);
m_StatValues[nNameID - 1] = nValue;
if (nNameID > m_nMaxUsedID)
m_nMaxUsedID = nNameID;
bResult = true;
Exit0:
return bResult;
}
示例11: Connect
int KDBTools::Init(char szConnectIP[], char DBAcc[], char szDBPsw[], char szDBName[])
{
int nResult = false;
BOOL bRetCode = false;
bRetCode = Connect(
szConnectIP,
szDBName,
DBAcc,
szDBPsw
);
KGLOG_PROCESS_ERROR(bRetCode);
memset(m_szSQL, '\0', sizeof(m_szSQL));
nResult = true;
Exit0:
return nResult;
}
示例12: while
BOOL KIDCache::SaveToBuffer(char* pData, DWORD dwSize)
{
KIDCacheNode* pNode = (KIDCacheNode*)m_CacheList.GetHead();
while (pNode)
{
DWORD dwNodeSize = sizeof(KIDCacheNode) + pNode->m_dwSize;
KGLOG_PROCESS_ERROR(dwSize >= dwNodeSize);
memcpy(pData, pNode, dwNodeSize);
pData += dwNodeSize;
dwSize -= dwNodeSize;
pNode = (KIDCacheNode*)pNode->GetNext();
}
return TRUE;
Exit0:
return FALSE;
}
示例13: KGLOG_PROCESS_ERROR
LRESULT KGObjectEditerProjectListDlg::OnListItemUpdate(WPARAM wParam, LPARAM lParam)
{
LPKGLISTITEM pListItem = (LPKGLISTITEM)wParam;
USER_ITEM_DATA itemData;
KGLOG_PROCESS_ERROR(pListItem);
pListItem->GetStructData(&itemData, sizeof(itemData));
if (!strcmp(itemData.szPropertyName, _T("RepresentID")))
{
UpdateProperty_R(atoi(itemData.szPropertyValue), true);
::SendMessage(m_pParentWindow->m_hWnd, WM_LIST_UPDATE_SCENE, wParam, lParam);
}
Exit0:
::SendMessage(m_pParentWindow->m_hWnd, WM_NOTIFY_ITEM_VALUE_UPDATE, wParam, lParam);
return true;
}
示例14: KGLOG_PROCESS_ERROR
int KTimelineMissileProcessor::Init(DWORD dwMissileParamID, KCompositeMissileProcessor* pCompositeMissileProcessor)
{
int nRetCode = false;
int nResult = false;
KRLMissileTimelineParam const* pParam = NULL;
pParam = g_pRL->m_TableList.GetMissileTimelineParam(dwMissileParamID);
KGLOG_PROCESS_ERROR(pParam);
memcpy(&m_Param, pParam, sizeof(m_Param));
nResult = true;
Exit0:
if (!nResult)
{
memset(&m_Param, 0, sizeof(m_Param));
}
return nResult;
}
示例15: SAFE_RELEASE
HRESULT KG3DShadowMapLevel::Init(DWORD dwSize)
{
HRESULT hr = S_OK;
m_dwShadowmapSize = dwSize;
nIndex = 0;
SAFE_RELEASE(m_lpSMColorSurface);
SAFE_RELEASE(m_lpSMColorMap);
SAFE_RELEASE(m_lpSMShadowMapSurface);
SAFE_RELEASE(m_lpSMShadowMap);
hr = OnResetDevice();
KGLOG_COM_PROCESS_ERROR(hr);
KGLOG_PROCESS_ERROR(m_lpSMShadowMapSurface);
return S_OK;
Exit0:
return E_FAIL;
}