本文整理汇总了C++中KG_PROCESS_SUCCESS函数的典型用法代码示例。如果您正苦于以下问题:C++ KG_PROCESS_SUCCESS函数的具体用法?C++ KG_PROCESS_SUCCESS怎么用?C++ KG_PROCESS_SUCCESS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了KG_PROCESS_SUCCESS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: KG_PROCESS_ERROR
int KDumpModuleAnalyzer::GetModules(HANDLE hExceptionThread, PEXCEPTION_POINTERS pExceptionInfo, KDumpModuleInfoVector *pDumpModuleInfoVector)
{
int nResult = false;
int nRetCode = false;
KDumpModuleInfo DefaultModuleInfo;
KG_PROCESS_ERROR(hExceptionThread);
KG_PROCESS_ERROR(pExceptionInfo);
KG_PROCESS_ERROR(pDumpModuleInfoVector);
nRetCode = GetFilteredModules(hExceptionThread, pExceptionInfo, pDumpModuleInfoVector);
KG_PROCESS_SUCCESS(nRetCode);
nRetCode = GetFirstModule(hExceptionThread, pExceptionInfo, pDumpModuleInfoVector);
KG_PROCESS_SUCCESS(nRetCode);
DefaultModuleInfo.dwModuleBase = 0;
DefaultModuleInfo.dwStackAddress = (DWORD64)pExceptionInfo->ExceptionRecord->ExceptionAddress;
strncpy(DefaultModuleInfo.szModuleName, UNKNOWN_MODULE_NAME, sizeof(DefaultModuleInfo.szModuleName) / sizeof(DefaultModuleInfo.szModuleName[0]));
DefaultModuleInfo.szModuleName[sizeof(DefaultModuleInfo.szModuleName) / sizeof(DefaultModuleInfo.szModuleName[0]) - 1] = '\0';
pDumpModuleInfoVector->push_back(DefaultModuleInfo);
Exit1:
nResult = true;
Exit0:
return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:28,代码来源:KDumpFile.cpp
示例2: KG_PROCESS_SUCCESS
BOOL KBroadcastFunc::operator()(KHero* pHero)
{
BOOL bResult = false;
BOOL bRetCode = false;
int nConnIndex = -1;
KPlayer* pPlayer = NULL;
KG_PROCESS_SUCCESS(pHero->m_dwID == m_dwExcept);
KG_PROCESS_SUCCESS(!pHero->IsMainHero());
pPlayer = pHero->GetOwner();
KG_PROCESS_SUCCESS(!pPlayer);
nConnIndex = pPlayer->m_nConnIndex;
KG_PROCESS_SUCCESS(nConnIndex == -1);
if (m_dwExclusive != ERROR_ID && pHero->m_dwID != m_dwExclusive)
{
goto Exit1;
}
g_PlayerServer.Send(nConnIndex, m_pvData, m_uSize);
Exit1:
bResult = true;
Exit0:
return bResult;
}
开发者ID:zhengguo07q,项目名称:GameWorld,代码行数:29,代码来源:KPlayerServer.cpp
示例3: KG_PROCESS_SUCCESS
BOOL KBuffList::DelBuff(DWORD dwBuffID)
{
BOOL bResult = false;
KBuff* pBuff = NULL;
KBuffTable::iterator it;
KG_PROCESS_SUCCESS(!dwBuffID);
it = m_BuffTable.find(dwBuffID);
KG_PROCESS_SUCCESS(it == m_BuffTable.end());
pBuff = g_pSO3World->m_BuffManager.GetBuff(dwBuffID);
KGLOG_PROCESS_ERROR(pBuff);
m_pSelf->UnApplyAttribute(pBuff->m_pRollBackAttr);
m_BuffTable.erase(dwBuffID);
g_PlayerServer.DoLoseBuffNotify(m_pSelf, dwBuffID);
Exit1:
bResult = true;
Exit0:
return bResult;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:25,代码来源:KBuffList.cpp
示例4: KG_PROCESS_SUCCESS
HRESULT KRLTarget::Hide()
{
int nRetCode = false;
HRESULT hr = E_FAIL;
HRESULT hrResult = E_FAIL;
IKG3DModel* p3DModel = NULL;
nRetCode = m_nRLForceRelation == RL_FORCE_RELATION_INVALID;
KG_PROCESS_SUCCESS(nRetCode);
p3DModel = m_ap3DModel[m_nRLForceRelation];
KG_PROCESS_SUCCESS(p3DModel == NULL);
hr = KModel::PauseAnimation(p3DModel, TRUE);
KGLOG_COM_PROCESS_ERROR(hr);
hr = KModel::RemoveRenderEntity(m_pRLScene->m_p3DScene, p3DModel, FALSE);
KGLOG_COM_PROCESS_ERROR(hr);
m_nRLForceRelation = RL_FORCE_RELATION_INVALID;
Exit1:
hrResult = S_OK;
Exit0:
return hrResult;
}
开发者ID:1suming,项目名称:pap2,代码行数:26,代码来源:krltarget.cpp
示例5: KGLOG_PROCESS_ERROR
void KRLRemoteCharacter::UpdateLifeState(BOOL bUpdateDisplayData)
{
int nRetCode = false;
HRESULT hr = E_FAIL;
BOOL bShowLifeBar = TRUE;
int nCharacterType = CHARACTER_TYPE_REMOTE_PLAYER;
KForceRelationModel const* pForceRelationModel = NULL;
KGLOG_PROCESS_ERROR(m_FrameData.m_pCharacter);
KG_PROCESS_SUCCESS(!m_FrameData.IsLifeChanged() && !bUpdateDisplayData);
if (!IS_PLAYER(m_RLCharacter.GetObjectID()))
{
KNpc* pNPC = (KNpc*)m_FrameData.m_pCharacter;
bShowLifeBar = pNPC->m_pTemplate->bCanSeeLifeBar;
nCharacterType = CHARACTER_TYPE_NPC;
}
KG_PROCESS_SUCCESS(!g_pRL->m_Option.bHeadSFXEnabled[nCharacterType][CHARACTER_SFX_LIFE - CHARACTER_SFX_BBOX_BALLOON_BEGIN]);
KG_PROCESS_SUCCESS(!bShowLifeBar);
pForceRelationModel = GetForceRelationModel(m_RLCharacter.GetObjectID(), g_pRL->m_pSO3World->m_dwClientPlayerID);
KGLOG_PROCESS_ERROR(pForceRelationModel);
hr = m_RLCharacter.m_RenderData.SetPercentage(pForceRelationModel->dwColor, m_FrameData.m_Current.fLifePercentage);
KGLOG_COM_PROCESS_ERROR(hr);
Exit1:
Exit0:
return;
}
开发者ID:1suming,项目名称:pap2,代码行数:35,代码来源:krlremotecharacter.cpp
示例6: assert
BOOL KCheckHeroBlowupFunc::operator()(KHero* pHero)
{
BOOL bResult = false;
BOOL bRetCode = false;
KLandMine* pLandMine = (KLandMine*)m_pLandMine;
KVELOCITY vBlowupVelocity = {0};
KPOSITION Src;
KPOSITION Dest;
int nDamage = 0;
assert(m_pLandMine);
KGLOG_PROCESS_ERROR(pLandMine->m_nBlowupRange > 0);
bRetCode = pHero->CanBeAttacked();
KG_PROCESS_SUCCESS(!bRetCode);
Src = pLandMine->GetPosition();
Dest = pHero->GetPosition();
Dest.nZ += pHero->m_nHeight / 2;
bRetCode = g_InRange(Dest.nX, Dest.nY, Dest.nZ, Src.nX, Src.nY, Src.nZ, pLandMine->m_nBlowupRange);
KG_PROCESS_SUCCESS(!bRetCode);
bRetCode = pHero->ApplyGeneralAffect(pLandMine->m_dwAttakerID, pLandMine, pLandMine->m_pTemplate->m_dwAttackAffectID1);
KGLOG_PROCESS_ERROR(bRetCode);
Exit1:
bResult = true;
Exit0:
return bResult;
}
开发者ID:zhengguo85938406,项目名称:GameWorld,代码行数:32,代码来源:KCollisionMgr.cpp
示例7: KG_PROCESS_SUCCESS
BOOL KRegion::CheckObstacle(int nXCell, int nYCell, int nLayer)
{
BOOL bFound = FALSE;
KG_PROCESS_SUCCESS(nXCell < 0);
KG_PROCESS_SUCCESS(nXCell >= REGION_GRID_WIDTH);
KG_PROCESS_SUCCESS(nYCell < 0);
KG_PROCESS_SUCCESS(nYCell >= REGION_GRID_HEIGHT);
KCell* pCell = &(m_Cells[nXCell][nYCell]);
while (pCell)
{
if (nLayer >= pCell->m_wLowLayer)
{
if (nLayer < pCell->m_wHighLayer)
return TRUE;
else
pCell = pCell->m_pNext;
}
else
{
return FALSE;
}
}
Exit0:
return FALSE;
Exit1:
// 非法区域全算障碍
return TRUE;
}
开发者ID:viticm,项目名称:pap2,代码行数:32,代码来源:KRegion.cpp
示例8: CheckAttacked
void KAIBase::OnIdle(void)
{
BOOL bRetCode = FALSE;
bRetCode = CheckAttacked();
KG_PROCESS_SUCCESS(bRetCode);
bRetCode = CheckTargetInAlertRange();
KG_PROCESS_SUCCESS(bRetCode);
bRetCode = CheckTargetInAttackRange();
KG_PROCESS_SUCCESS(bRetCode);
KGLOG_PROCESS_ERROR(m_pSelf);
if (g_pSO3World->m_nGameLoop >= m_IdleData.nIdleFrameCount)
{
//根据之前的状态恢复工作
switch(m_eAIMainState)
{
case aisInvalid:
KGLOG_CHECK_ERROR(!"Invalid main state!");
break;
case aisIdle:
//当Npc站立的时候,调整Npc的方向
if (m_pSelf->m_eMoveState == cmsOnStand
&& m_pSelf->m_nFaceDirection != m_nOriginDirection)
{
bRetCode = m_pSelf->Turn(m_nOriginDirection, true, true);
KGLOG_PROCESS_ERROR(bRetCode);
}
break;
case aisWander:
DoWander();
break;
case aisPatrol:
DoPatrol();
break;
case aisFollow:
DoFollow();
break;
default:
KGLOG_CHECK_ERROR(FALSE);
DoIdle();
break;
}
return;
}
Exit1:
return;
Exit0:
return;
}
开发者ID:1suming,项目名称:pap2,代码行数:54,代码来源:KAIBase.cpp
示例9: ASSERT
int KTestCommon::ModifyVersionFile(const TCHAR cszFilePath[], const TCHAR cszVersion[])
{
int nResult = false;
int nRetCode = false;
FILE* pVerFile = NULL;
TCHAR* pszRet = NULL;
size_t uLength = 0;
long lOffset = 0L;
TCHAR szBuffer[MAX_PATH];
ASSERT(cszFilePath);
ASSERT(cszVersion);
//修改版本信息文件中的版本号,用于测试需要
nRetCode = _tfopen_s(&pVerFile, cszFilePath, _T("r+"));
KGLOG_PROCESS_ERROR(nRetCode == 0);
uLength = _tcslen(PRODUCT_VERSION_KEY);
while (TRUE)
{
pszRet = _fgetts(szBuffer, sizeof(szBuffer) / sizeof(TCHAR), pVerFile);
if (!pszRet)
{
nRetCode = ferror(pVerFile);
KGLOG_PROCESS_ERROR(nRetCode == 0);
KG_PROCESS_SUCCESS(nRetCode == 0);
}
szBuffer[sizeof(szBuffer) / sizeof(TCHAR) - 1] = _T('\0');
if (szBuffer[0] != _T('#'))
{
nRetCode = _tcsncicmp(szBuffer, PRODUCT_VERSION_KEY, uLength);
if (!nRetCode && szBuffer[uLength] == _T('='))
{
lOffset += (long)uLength + 1;
nRetCode = fseek(pVerFile, lOffset, SEEK_SET);
KGLOG_PROCESS_ERROR(nRetCode == 0);
nRetCode = _fputts(cszVersion, pVerFile);
KGLOG_PROCESS_ERROR(nRetCode != EOF && nRetCode != WEOF);
KG_PROCESS_SUCCESS(true);
}
}
lOffset += (long)_tcslen(szBuffer) + 1;
}
Exit1:
nResult = true;
Exit0:
if (pVerFile)
{
fclose(pVerFile);
pVerFile = NULL;
}
return nResult;
}
开发者ID:viticm,项目名称:pap2,代码行数:53,代码来源:KTestCommon.cpp
示例10: StartProfile
int KRLTarget::Update(double /* fTime */, double /* fTimeLast */, DWORD /* dwGameLoop */, BOOL /* bFrame */)
{
int nRetCode = false;
int nResult = false;
HRESULT hr = E_FAIL;
StartProfile(&g_pRL->m_Profile, KRLPROFILE_TARGET);
nRetCode = m_nObjectType == RL_OBJECT_UNKNOWN;
KG_PROCESS_SUCCESS(nRetCode);
nRetCode = m_ap3DModel[m_nRLForceRelation] == NULL;
KG_PROCESS_SUCCESS(nRetCode);
switch (m_nObjectType)
{
case RL_OBJECT_PLAYER:
case RL_OBJECT_NPC:
{
KRLRemoteCharacter* pRLRemoteCharacter = NULL;
pRLRemoteCharacter = m_pRLScene->m_CharacterMgr.Lookup(m_dwObjectID);
if (pRLRemoteCharacter)
{
pRLRemoteCharacter->m_RLCharacter.GetPosition(m_vPosition);
}
else
{
m_vPosition = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
hr = Hide();
KGLOG_COM_PROCESS_ERROR(hr);
}
}
break;
case RL_OBJECT_DOODAD:
case RL_OBJECT_RIDES:
break;
default:
ASSERT(0);
break;
}
hr = KModel::SetPosition(m_ap3DModel[m_nRLForceRelation], m_vPosition);
KGLOG_COM_PROCESS_ERROR(hr);
Exit1:
nResult = true;
Exit0:
StopProfile(&g_pRL->m_Profile, KRLPROFILE_TARGET);
return nResult;
}
开发者ID:1suming,项目名称:pap2,代码行数:52,代码来源:krltarget.cpp
示例11: KG_PROCESS_ERROR
void KAIBase::OnAlert(void)
{
KCharacter* pTarget = NULL;
BOOL bRetCode = FALSE;
bRetCode = m_pSelf->m_SelectTarget.GetTarget(&pTarget);
KG_PROCESS_ERROR(bRetCode && pTarget);
if (pTarget)
{
//目标超出范围
int nDistance2 = g_GetDistance2(m_pSelf->m_nX, m_pSelf->m_nY, pTarget->m_nX, pTarget->m_nY);
//按等级修正距离
int nCheckDistance2 = (int)(m_pAIParam->nAlertRange * m_pAIParam->nAlertRange);
KG_PROCESS_ERROR(nDistance2 <= nCheckDistance2);
//朝向目标
int nDirection = g_GetDirection(m_pSelf->m_nX, m_pSelf->m_nY, pTarget->m_nX, pTarget->m_nY);
if (m_pSelf->m_nFaceDirection != nDirection)
{
m_pSelf->Turn(nDirection, true, true);
}
//目标未丢失, 看是否超时
if (g_pSO3World->m_nGameLoop > m_AlertData.nAlartFrame)
{
//超时,进行攻击
m_pSelf->m_ThreatList.ModifyThreat(pTarget, 0);
TurnToFight();
return;
}
}
bRetCode = CheckTargetInAttackRange();
KG_PROCESS_SUCCESS(bRetCode);
return;
Exit0:
bRetCode = CheckTargetInAttackRange();
KG_PROCESS_SUCCESS(bRetCode);
//什么都没有了,出警戒状态,开始发呆
ClearTarget();
DoIdle(1);
return;
Exit1:
return;
}
开发者ID:1suming,项目名称:pap2,代码行数:52,代码来源:KAIBase.cpp
示例12: IS_PLAYER
void KAIBase::OnClearThreat(KCharacter* pCharater)
{
BOOL bResult = FALSE;
bResult = IS_PLAYER(m_pSelf->m_dwID);
KG_PROCESS_SUCCESS(bResult == TRUE);
// Npc仇恨链接时,会连锁清空仇恨
if (m_pNpcTeam)
{
KNpc* pNpc = NULL;
int nIndex = 0;
int nMemberCount = m_pNpcTeam->GetMemberCount();
for (nIndex = 0; nIndex < nMemberCount; nIndex++)
{
pNpc = m_pNpcTeam->GetMember(nIndex);
if (pNpc && pNpc != m_pSelf && pNpc != pCharater)
{
bResult = pNpc->m_ThreatList.ClearThreat(pCharater);
KGLOG_PROCESS_ERROR(bResult);
}
}
}
Exit1:
return;
Exit0:
return;
}
开发者ID:1suming,项目名称:pap2,代码行数:30,代码来源:KAIBase.cpp
示例13: KG_PROCESS_SUCCESS
HRESULT KG3DEnvEffDWController::FrameMove()
{
KG_PROCESS_SUCCESS(NULL == m_pObj);
if (m_bIsBlending) ///正在渐变
{
_ASSERTE(m_fBlendPercent > 0- FLT_EPSILON);
DWORD dwNowTime = g_cGraphicsTool.GetNowTime();
_ASSERTE(dwNowTime > 0.0f);
m_fBlendPercent = (dwNowTime - m_dwBlendStartMiliSecond) / (m_fNextBlendGap);
_ASSERTE(m_fBlendPercent >= 0.0f);
if (m_fBlendPercent < 1.0f)
{
m_pObj->AllEnvEff_SetPercent(m_fBlendPercent);
goto Exit1;
}
m_fBlendPercent = 0;///归0
_ASSERTE(m_BlendQueue.size() == 1);
m_BlendQueue.pop();
m_pObj->AllEnvEff_RequestPopFrontState();
this->UnInitBlendData();
}///if (m_bIsBlending) ///正在渐变
Exit1:
return S_OK;
}
开发者ID:viticm,项目名称:pap2,代码行数:29,代码来源:KG3DEnvEffDWController.cpp
示例14: ASSERT
int KCircleMissileProcessor::Start(double fTime, KRLMissile* pRLMissile)
{
int nRetCode = false;
int nResult = false;
KSkill const* pSkill = NULL;
KMissilePhaseCircleModel* pCircleModel = NULL;
KCircleMissileParam BeginParam;
KCircleMissileParam EndParam;
float fBulletVelocity = 0.0f;
ASSERT(m_pRLMissile);
ASSERT(m_pMissilePhaseModel);
pCircleModel = (KMissilePhaseCircleModel*)m_pMissilePhaseModel;
pSkill = g_pRL->m_pSO3WorldClient->GetSkill(m_pRLMissile->m_Param.Result.dwSkillID, m_pRLMissile->m_Param.Result.dwSkillLevel);
KGLOG_PROCESS_ERROR(pSkill);
// begin
BeginParam.fLineHeight = ToSceneLength(pCircleModel->nLineHeightBegin);
BeginParam.fCircleRadius = ToSceneLength(pCircleModel->nCircleRadiusBegin);
BeginParam.fTerrainOffset = ToSceneLength(pCircleModel->nTerrainOffsetBegin);
BeginParam.fFOV = ToSceneAngle(pCircleModel->nFOVBegin);
BeginParam.fFOVAngleVelocity = ToSceneAngleVelocity(pCircleModel->nFOVAngleVelocityBegin);
// end
EndParam.fLineHeight = ToSceneLength(pCircleModel->nLineHeightEnd);
EndParam.fCircleRadius = ToSceneLength(pCircleModel->nCircleRadiusEnd);
EndParam.fTerrainOffset = ToSceneLength(pCircleModel->nTerrainOffsetEnd);
EndParam.fFOV = ToSceneAngle(pCircleModel->nFOVEnd);
EndParam.fFOVAngleVelocity = ToSceneAngleVelocity(pCircleModel->nFOVAngleVelocityEnd);
// Bullet
fBulletVelocity = ToSceneVelocity(pSkill->m_nBulletVelocity);
nRetCode = abs(fBulletVelocity) > FLT_EPSILON;
KG_PROCESS_SUCCESS(!nRetCode);
// Track Parameter
m_fMeteorSpeed = fBulletVelocity * pCircleModel->fSpeedScale;
m_fMeteorRadius = ToSceneLength(pCircleModel->nMeteorRadius);
m_fTotalModelScale = pCircleModel->fModelScaleEnd - pCircleModel->fModelScaleBegin;
m_fParabolaAngle = ToSceneAngle(pCircleModel->nParabolaAngle);
m_fTotalDistance = EndParam.fLineHeight - BeginParam.fLineHeight;
nRetCode = InitCircleMissileOrientationData(BeginParam, EndParam);
KGLOG_PROCESS_ERROR(nRetCode);
if (m_fTotalDistance <= FLT_EPSILON)
SetTimeTotal(pCircleModel->fPervasionTime);
else
SetTimeTotal(m_fTotalDistance / fBulletVelocity);
Exit1:
nResult = true;
Exit0:
return nResult;
}
开发者ID:1suming,项目名称:pap2,代码行数:60,代码来源:kcirclemissileprocessor.cpp
示例15: int
BOOL KAwardMgr::GetRoomSizeToAwardAll(DWORD dwAwardTableID, int(&RoomSize)[eppiTotal])
{
BOOL bResult = false;
BOOL bRetCode = false;
KAwardTable* pAwardTable = NULL;
KAWARD_ITEM* pAwardItem = NULL;
int nPackageIndex = 0;
memset(RoomSize, 0, sizeof(RoomSize));
KG_PROCESS_SUCCESS(dwAwardTableID == ERROR_ID);
pAwardTable = GetAwardTable(dwAwardTableID);
KGLOG_PROCESS_ERROR(pAwardTable);
for (KAWARD_ITEM_MAP::iterator it = pAwardTable->m_mapAwardItem.begin(); it != pAwardTable->m_mapAwardItem.end(); ++it)
{
pAwardItem = &it->second;
if (pAwardItem->dwTabType == 0)
continue;
RoomSize[eppiPlayerItemBox] += 1;
}
Exit1:
bResult = true;
Exit0:
return bResult;
}
开发者ID:zhengguo07q,项目名称:GameWorld,代码行数:29,代码来源:KAwardMgr.cpp
示例16: CheckReturn
void KAIBase::OnReturn(void)
{
int nRetCode = cmsInvalid;
BOOL bRetCode = FALSE;
bRetCode = CheckReturn();
KG_PROCESS_SUCCESS(bRetCode);
nRetCode = m_pSelf->m_eMoveState;
if (nRetCode == cmsOnStand)
{
int nDir = g_GetDirection(m_pSelf->m_nX, m_pSelf->m_nY, m_nReturnX, m_nReturnY);
m_pSelf->Turn(nDir, true, true);
// 跑回ReturnPoint
//KGLogPrintf(KGLOG_DEBUG, "[AI] Return Run to (%d, %d)\n", m_nReturnX, m_nReturnY);
m_pSelf->RunTo(m_nReturnX, m_nReturnY);
}
return;
Exit1:
//返回原点了,停一秒
if (m_pNpcTeam)
DoWait();
else
DoIdle(GAME_FPS);
return;
}
开发者ID:1suming,项目名称:pap2,代码行数:30,代码来源:KAIBase.cpp
示例17: ASSERT
IKG3Profile_Recorder *KG3DProfile_Manager_Imp::GetRecord(unsigned uUnionID, const char cszName[])
{
IKG3Profile_Recorder *pRecorder = NULL;
KG3Profile_Recorder_Imp *pNewRecorder = NULL;
RECORDER_MAP::iterator itExist;
ASSERT(cszName);
KG_PROCESS_SUCCESS(!m_nEnableProfileFlag);
itExist = m_RecorderMap.find(uUnionID);
if (itExist != m_RecorderMap.end())
{
pRecorder = itExist->second;
}
else
{
RECORDER_MAP::_Pairib InsertResult;
pNewRecorder = new KG3Profile_Recorder_Imp(cszName);
KGLOG_PROCESS_ERROR(pNewRecorder);
InsertResult = m_RecorderMap.insert(make_pair(uUnionID, pNewRecorder));
ASSERT(InsertResult.second);
pRecorder = pNewRecorder;
pNewRecorder = NULL;
}
Exit1:
Exit0:
KG_DELETE(pNewRecorder);
return pRecorder;
}
开发者ID:1suming,项目名称:pap2,代码行数:32,代码来源:KG3DProfile.cpp
示例18: KG_PROCESS_ERROR
void KG3DAnimationComposer::AddAnimation(KG3DAnimationUpdateExtraInfoCollector *pCollector,
DWORD dwIndex)
{
size_t i = 0;
KG_PROCESS_ERROR(m_SkeletonInfo.size());
KG_PROCESS_ERROR(m_pModel);
for (i = 0; i < m_SkeletonInfo[0].Info.size(); i++)
{
if (pCollector == m_SkeletonInfo[0].Info[i].pCollector)
break;
}
//如果找到了存在的Colletor就不用创建新的了
KG_PROCESS_SUCCESS(i != m_SkeletonInfo[0].Info.size());
for (i = 0; i < m_SkeletonInfo.size(); i++)
{
BoneInfoItem Item;
Item.pCollector = pCollector;
Item.dwIndex = dwIndex;
m_SkeletonInfo[i].Info.push_back(Item);
}
m_Controller.resize(m_Controller.size() + 1);
m_TweenTimeInfo.resize(m_TweenTimeInfo.size() + 1);
m_TweenTimeInfo[m_TweenTimeInfo.size() - 1].Init(m_pSkeleton->GetNumBones());
Exit1:
Exit0:
return;
}
开发者ID:1suming,项目名称:pap2,代码行数:30,代码来源:KG3DAnimationWarper.cpp
示例19: KG_PROCESS_SUCCESS
void KG3DAnimationComposer::SetSkeleton(KG3DSkeleton* pSkeleton)
{
HRESULT hrResult = E_FAIL;
DWORD dwBoneNum = 0;
m_SkeletonInfo.clear();
m_pSkeleton = pSkeleton;
KG_PROCESS_SUCCESS(!m_pSkeleton);
dwBoneNum = (DWORD)m_pSkeleton->GetNumBones();
m_SkeletonInfo.resize(dwBoneNum);
KG_DELETE_ARRAY(m_pWorldResult);
m_pWorldResult = new D3DXMATRIX[dwBoneNum];
KG_PROCESS_ERROR(m_pWorldResult);
Exit1:
hrResult = S_OK;
Exit0:
if (FAILED(hrResult))
{
KG_DELETE_ARRAY(m_pWorldResult);
}
}
开发者ID:1suming,项目名称:pap2,代码行数:25,代码来源:KG3DAnimationWarper.cpp
示例20: assert
BOOL KLogClient::Send(IKG_Buffer* piBuffer)
{
BOOL bResult = false;
int nRetCode = false;
INTERNAL_PROTOCOL_HEADER* pHeader = NULL;
size_t uPakSize = 0;
assert(piBuffer);
KG_PROCESS_SUCCESS(m_piSocketStream == NULL);
KG_PROCESS_ERROR(!m_bSocketError);
uPakSize = piBuffer->GetSize();
assert(uPakSize >= sizeof(INTERNAL_PROTOCOL_HEADER));
pHeader = (INTERNAL_PROTOCOL_HEADER*)piBuffer->GetData();
KGLOG_PROCESS_ERROR(pHeader);
assert(pHeader->wProtocolID > g2l_protocol_begin);
assert(pHeader->wProtocolID < g2l_protocol_end);
nRetCode = m_piSocketStream->Send(piBuffer);
if (nRetCode != 1)
{
m_bSocketError = true;
goto Exit0;
}
m_nLastSendPacketTime = g_pSO3World->m_nCurrentTime;
Exit1:
bResult = true;
Exit0:
return bResult;
}
开发者ID:zhengguo07q,项目名称:GameWorld,代码行数:34,代码来源:KLogClient.cpp
注:本文中的KG_PROCESS_SUCCESS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论