本文整理汇总了C++中KGLOG_PROCESS_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ KGLOG_PROCESS_ERROR函数的具体用法?C++ KGLOG_PROCESS_ERROR怎么用?C++ KGLOG_PROCESS_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了KGLOG_PROCESS_ERROR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:viticm,项目名称:pap2,代码行数:18,代码来源:krlmissile.cpp
示例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;
}
开发者ID:1suming,项目名称:pap2,代码行数:44,代码来源:KG3DTerrainDetailTexture.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:44,代码来源:KLuaItem.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:44,代码来源:KScriptFuncList.cpp
示例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);
}
开发者ID:viticm,项目名称:pap2,代码行数:36,代码来源:KTestGenerateList.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:19,代码来源:KTeamClient.cpp
示例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;
}
开发者ID:1suming,项目名称:pap2,代码行数:43,代码来源:KLogClient.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:19,代码来源:KItemManager.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:19,代码来源:KBattleFieldManager.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:20,代码来源:KStatDataManager.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:19,代码来源:KDBTools.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:19,代码来源:KIDCache.cpp
示例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;
}
开发者ID:viticm,项目名称:pap2,代码行数:19,代码来源:KGObjectEditerProjectListDlg.cpp
示例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;
}
开发者ID:1suming,项目名称:pap2,代码行数:19,代码来源:ktimelinemissileprocessor.cpp
示例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;
}
开发者ID:1suming,项目名称:pap2,代码行数:19,代码来源:KG3DSceneShadowMap.cpp
示例16: KGLOG_PROCESS_ERROR
BOOL KAIBase::SetAIInterval(double fRate)
{
BOOL bRetCode = FALSE;
KGLOG_PROCESS_ERROR(fRate > 0.0 && fRate <= 1.0);
m_nAIInterval = (int)(g_pSO3World->m_Settings.m_ConstList.nAIInterval * fRate);
if (m_nAIInterval < 1)
m_nAIInterval = 1;
if (g_pSO3World->m_nGameLoop + m_nAIInterval < m_nNextActiveFrame)
{
m_nNextActiveFrame = g_pSO3World->m_nGameLoop + m_nAIInterval;
}
bRetCode = TRUE;
Exit0:
return bRetCode;
}
开发者ID:1suming,项目名称:pap2,代码行数:19,代码来源:KAIBase.cpp
示例17: KGLOG_PROCESS_ERROR
KAILogic* KAIManager::GetAILogic(int nAIType)
{
KAILogic* pLogic = NULL;
KAIInfo* pInfo = NULL;
KAI_TABLE::iterator it = m_AITable.find(nAIType);
KGLOG_PROCESS_ERROR(it != m_AITable.end());
pInfo = &it->second;
if (!pInfo->pLogic)
{
pInfo->pLogic = CreateAI(nAIType, pInfo->dwScriptID);
}
pLogic = pInfo->pLogic;
Exit0:
return pLogic;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:19,代码来源:KAIManager.cpp
示例18: Lua_GetTopIndex
int KScene::LuaSetGravity(Lua_State* L)
{
int nTopIndex = 0;
int nNewGravity = 0;
nTopIndex = Lua_GetTopIndex(L);
KGLOG_PROCESS_ERROR(nTopIndex == 1);
nNewGravity = (int)Lua_ValueToNumber(L, 1);
m_nGlobalGravity = nNewGravity;
g_PlayerServer.DoSyncSceneGravity(this);
LogInfo("Set scene Gravity to %d", nNewGravity);
Exit0:
return 0;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:19,代码来源:KLuaScene.cpp
示例19: KGLogPrintf
void KGatewaytest::TestUserLoginGatewayLockTheAccount() // caseID:5126
{
int nResult = false;
int nRetCode = false;
char szTestCaseDscribe[] = "// caseID:5126,账号登陆,Paysys验证通过,但该帐户在另外的地方正在登陆,Client玩家收到账号已锁定";
KG_RETURN_RESULT Result;
KGLogPrintf(KGLOG_INFO, "caseID:5126\n");
FillTestUserLoginInfo(KG_USER_LOGIN, ACTION_SUCCESS, AccountUserLoginInfo, PASSPODMODE_UNBIND, ACTION_SUCCESS, false, true, USER_ACCOUNT_LOCKED, false);
nRetCode = InitTestEnvironment(true, true, true, 2, m_GatewayTestConfig.ForecastConfig.nTestPoint);
KGLOG_PROCESS_ERROR(nRetCode);
nRetCode = m_pClientController->ModifyClientUserName(1,"0");
KGLOG_PROCESS_ERROR(nRetCode);
nRetCode = m_pClientController->FillOperate(
3,
onConnectToGateway,
onHandShake,
onAccountVerify
);
KGLOG_PROCESS_ERROR(nRetCode);
nRetCode = m_pClientController->Run();
KGLOG_PROCESS_ERROR(nRetCode);
nRetCode = m_pClientController->GetReturnResult(1, &Result);
KGLOG_PROCESS_ERROR(nRetCode);
nRetCode = memcmp(&Result, &(m_GatewayTestConfig.ForecastConfig), sizeof(Result));
KGLOG_PROCESS_ERROR(!nRetCode);
nResult = true;
Exit0:
UnInitTestEnvironment();
#ifdef WIN32
{
KG_CASE_INFO(szTestCaseDscribe, "");
KG_CPPUNIT_ASSERT(nResult);
}
#else
{
//InsertInfo(CASEPURPOSE, (szTestCaseDscribe));
//InsertInfo(PRECONDITION, (""));
CPPUNIT_ASSERT(nResult);
}
#endif
}
开发者ID:viticm,项目名称:pap2,代码行数:50,代码来源:SO3GatewayTestUserLogin.cpp
示例20: cPath
BOOL KBall::SkillShoot(KHero* pShooter, KBasketSocket* pSocket)
{
BOOL bResult = false;
BOOL bRetCode = false;
int nVelocity = CELL_LENGTH;
KSkillShootPath cPath((GetCurrentGravity()));
KPOSITION cSocketPos;
KPOSITION cSrc;
KPOSITION cDst;
KPOSITION cCtrl;
KGLOG_PROCESS_ERROR(pShooter && pSocket);
bRetCode = CanBeShootBy(pShooter);
KG_PROCESS_ERROR(bRetCode);
cSocketPos = pSocket->GetPosition();
cSrc = GetShootStartPos(pShooter);
cDst = cSocketPos;
cDst.nZ += CELL_LENGTH * 3;
cCtrl.nX = (pSocket->m_eDir == csdLeft) ? cSocketPos.nX - (CELL_LENGTH * 12) : cSocketPos.nX + (CELL_LENGTH * 12);
cCtrl.nY = cSocketPos.nY;
cCtrl.nZ = CELL_LENGTH * 4;
cPath.SetCtrlParams(cSrc, cDst, cCtrl, nVelocity);
cPath.Start(g_pSO3World->m_nGameLoop);
DoTrackMove(&cPath);
m_bAttackState = true;
m_dwShooterID = pShooter->m_dwID;
m_dwThrowerID = ERROR_ID;
m_pTargetSocket = pSocket;
m_bRestAfterTrackMove = true;
bResult = true;
Exit0:
return bResult;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:42,代码来源:KBall.cpp
注:本文中的KGLOG_PROCESS_ERROR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论