本文整理汇总了C++中ReadProp函数的典型用法代码示例。如果您正苦于以下问题:C++ ReadProp函数的具体用法?C++ ReadProp怎么用?C++ ReadProp使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ReadProp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
uint32 AmmoBox::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
uint32 dwRet = PickupItem::EngineMessageFn(messageID, pData, fData);
if (fData == PRECREATE_WORLDFILE || fData == PRECREATE_STRINGPROP)
{
if( !ReadProp((ObjectCreateStruct*)pData))
return 0;
}
return dwRet;
}
break;
case MID_SAVEOBJECT:
{
Save((ILTMessage_Write*)pData, (uint32)fData);
}
break;
case MID_LOADOBJECT:
{
Load((ILTMessage_Read*)pData, (uint32)fData);
}
break;
default : break;
}
return PickupItem::EngineMessageFn(messageID, pData, fData);
}
示例2: switch
uint32 Key::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
if (fData == PRECREATE_WORLDFILE)
{
ReadProp((ObjectCreateStruct*)pData);
}
break;
}
case MID_INITIALUPDATE:
{
InitialUpdate((LTVector *)pData);
break;
}
default : break;
}
return BaseClass::EngineMessageFn(messageID, pData, fData);
}
示例3: switch
DDWORD WorldModelDebris::EngineMessageFn(DDWORD messageID, void *pData, float fData)
{
switch (messageID)
{
case MID_UPDATE:
{
Update();
break;
}
case MID_PRECREATE:
{
if ( fData == PRECREATE_WORLDFILE )
ReadProp(( ObjectCreateStruct * )pData);
break;
}
case MID_SAVEOBJECT:
{
Save((HMESSAGEWRITE)pData, (DDWORD)fData);
}
break;
case MID_LOADOBJECT:
{
Load((HMESSAGEREAD)pData, (DDWORD)fData);
}
break;
default : break;
}
return DestructableDoor::EngineMessageFn(messageID, pData, fData);
}
示例4: switch
DDWORD B2BaseClass::EngineMessageFn(DDWORD messageID, void *pData, DFLOAT fData)
{
if (!g_pServerDE) return 0;
// Set object type...
switch (messageID)
{
case MID_PRECREATE:
{
if (fData == PRECREATE_WORLDFILE || fData == PRECREATE_STRINGPROP)
ReadProp((ObjectCreateStruct*)pData);
}
break;
case MID_INITIALUPDATE:
{
if (fData == INITIALUPDATE_WORLDFILE)
{
DBOOL bResult = InitialUpdate();
if (!bResult)
g_pServerDE->RemoveObject(m_hObject);
}
}
break;
}
return BaseClass::EngineMessageFn(messageID, pData, fData);
}
示例5: switch
uint32 ExitTrigger::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
if (fData == PRECREATE_WORLDFILE)
{
ReadProp((ObjectCreateStruct*)pData);
}
uint32 dwRet = Trigger::EngineMessageFn(messageID, pData, fData);
PostPropRead((ObjectCreateStruct*)pData);
return dwRet;
}
case MID_SAVEOBJECT:
{
Save((ILTMessage_Write*)pData, (uint32)fData);
}
break;
case MID_LOADOBJECT:
{
Load((ILTMessage_Read*)pData, (uint32)fData);
}
break;
default : break;
}
return Trigger::EngineMessageFn(messageID, pData, fData);
}
示例6: switch
DDWORD ParticleSystem::EngineMessageFn(DDWORD messageID, void *pData, DFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
if (fData == 1.0f || fData == 2.0f)
{
ReadProp((ObjectCreateStruct *)pData);
}
break;
}
case MID_INITIALUPDATE:
{
InitialUpdate((DVector *)pData);
break;
}
case MID_UPDATE:
{
CServerDE* pServerDE = GetServerDE();
if (pServerDE)
{
pServerDE->RemoveObject(m_hObject);
}
break;
}
default : break;
}
return CClientSFX::EngineMessageFn(messageID, pData, fData);
}
示例7: switch
uint32 ScatterVolume::EngineMessageFn( uint32 messageID, void* pData, LTFLOAT fData )
{
switch( messageID )
{
case MID_PRECREATE:
{
ObjectCreateStruct* pOCS = (ObjectCreateStruct*)pData;
if( !pOCS )
break;
if( fData == PRECREATE_WORLDFILE )
{
ReadProp( pOCS );
// make sure this object is always in the visible object list
pOCS->m_Flags |= FLAG_FORCECLIENTUPDATE;
}
}
break;
case MID_INITIALUPDATE:
InitialUpdate();
break;
}
return VolumeEffect::EngineMessageFn( messageID, pData, fData );
}
示例8: switch
uint32 AIVolume::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
g_pLTServer->SetNextUpdate(m_hObject, 0.01f);
uint32 dwRet = BaseClass::EngineMessageFn(messageID, pData, fData);
if (fData == PRECREATE_WORLDFILE || fData == PRECREATE_STRINGPROP)
{
ReadProp((ObjectCreateStruct*)pData);
}
ObjectCreateStruct* pStruct = (ObjectCreateStruct*)pData;
pStruct->m_Flags |= FLAG_VISIBLE;
pStruct->m_ObjectType = OT_WORLDMODEL;//CONTAINER;
SAFE_STRCPY(pStruct->m_Filename, pStruct->m_Name);
pStruct->m_SkinName[0] = '\0';
//pStruct->m_ContainerCode = CC_VOLUME;
return dwRet;
break;
}
default : break;
}
return BaseClass::EngineMessageFn(messageID, pData, fData);
}
示例9: switch
uint32 WeaponItem::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_UPDATE:
{
uint32 dwRet = PickupItem::EngineMessageFn(messageID, pData, fData);
g_pLTServer->SetNextUpdate(m_hObject, 0.0f);
return dwRet;
}
break;
case MID_PRECREATE:
{
uint32 dwRet = PickupItem::EngineMessageFn(messageID, pData, fData);
if (fData == PRECREATE_WORLDFILE || fData == PRECREATE_STRINGPROP)
{
ReadProp((ObjectCreateStruct*)pData);
}
if (fData != PRECREATE_SAVEGAME)
{
PostPropRead((ObjectCreateStruct*)pData);
}
return dwRet;
}
break;
case MID_INITIALUPDATE:
{
uint32 dwRet = PickupItem::EngineMessageFn(messageID, pData, fData);
if (fData != INITIALUPDATE_SAVEGAME)
{
InitialUpdate();
}
return dwRet;
}
case MID_SAVEOBJECT:
{
Save((HMESSAGEWRITE)pData, (uint32)fData);
}
break;
case MID_LOADOBJECT:
{
Load((HMESSAGEREAD)pData, (uint32)fData);
}
break;
default : break;
}
return PickupItem::EngineMessageFn(messageID, pData, fData);
}
示例10: switch
uint32 VolumeBrush::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
uint32 dwRet;
switch(messageID)
{
case MID_UPDATE:
{
Update();
break;
}
case MID_AFFECTPHYSICS:
{
UpdatePhysics((ContainerPhysics*)pData);
break;
}
case MID_PRECREATE:
{
dwRet = GameBase::EngineMessageFn(messageID, pData, fData);
if (fData == PRECREATE_WORLDFILE)
{
ReadProp((ObjectCreateStruct*)pData);
}
PostPropRead((ObjectCreateStruct*)pData);
return dwRet;
break;
}
case MID_INITIALUPDATE:
{
if (fData != INITIALUPDATE_SAVEGAME)
{
InitialUpdate();
}
CacheFiles();
break;
}
case MID_SAVEOBJECT:
{
Save((HMESSAGEWRITE)pData, (uint32)fData);
}
break;
case MID_LOADOBJECT:
{
Load((HMESSAGEREAD)pData, (uint32)fData);
}
break;
default : break;
}
return GameBase::EngineMessageFn(messageID, pData, fData);
}
示例11: switch
uint32 CScanner::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch (messageID)
{
case MID_PRECREATE:
{
if (fData == PRECREATE_WORLDFILE || fData == PRECREATE_STRINGPROP)
{
ObjectCreateStruct* pStruct = (ObjectCreateStruct*)pData;
ReadProp(pStruct);
// Don't stand on the player...
pStruct->m_Flags |= FLAG_DONTFOLLOWSTANDING;
}
}
break;
case MID_INITIALUPDATE:
{
if (fData != INITIALUPDATE_SAVEGAME)
{
}
CacheFiles();
}
break;
case MID_LINKBROKEN :
{
HOBJECT hLink = (HOBJECT)pData;
if (hLink)
{
if (hLink == m_hLastDetectedEnemy)
{
m_hLastDetectedEnemy = LTNULL;
}
}
}
break;
case MID_SAVEOBJECT:
{
Save((HMESSAGEWRITE)pData);
}
break;
case MID_LOADOBJECT:
{
Load((HMESSAGEREAD)pData);
}
break;
default : break;
}
return Prop::EngineMessageFn(messageID, pData, fData);
}
示例12: switch
uint32 DoomsDayDevice::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
uint32 dwRet = PropType::EngineMessageFn(messageID, pData, fData);
if (fData == PRECREATE_WORLDFILE || fData == PRECREATE_STRINGPROP)
{
if( !ReadProp(( ObjectCreateStruct* )pData ))
return 0;
// Always start out with the base proptype.
m_sPropType = "Doomsday_base";
}
return dwRet;
}
break;
case MID_INITIALUPDATE:
{
uint32 dwRet = PropType::EngineMessageFn(messageID, pData, fData);
if (fData != INITIALUPDATE_SAVEGAME)
{
InitialUpdate();
}
return dwRet;
}
break;
case MID_UPDATE:
{
Update();
}
break;
case MID_SAVEOBJECT:
{
Save((ILTMessage_Write*)pData, (uint32)fData);
}
break;
case MID_LOADOBJECT:
{
Load((ILTMessage_Read*)pData, (uint32)fData);
}
break;
default : break;
}
return PropType::EngineMessageFn(messageID, pData, fData);
}
示例13: switch
uint32 LightGroup::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
ObjectCreateStruct *pOCS = (ObjectCreateStruct*)pData;
if (!pOCS)
break;
if( fData == PRECREATE_WORLDFILE )
{
ReadProp(pOCS);
}
PostReadProp(pOCS);
}
break;
case MID_INITIALUPDATE:
{
if( fData != INITIALUPDATE_SAVEGAME )
{
InitialUpdate();
}
}
break;
case MID_SAVEOBJECT:
{
Save((ILTMessage_Write*)pData, (uint32)fData);
}
break;
case MID_LOADOBJECT:
{
Load((ILTMessage_Read*)pData, (uint32)fData);
}
break;
case MID_UPDATE:
{
// Send a new update if we were waiting for the client to do something
if (m_bClientNeedsUpdate)
{
UpdateClients();
// Turn back off
SetNextUpdate(m_hObject, UPDATE_NEVER);
}
}
break;
default : break;
}
return Engine_LightGroup::EngineMessageFn(messageID, pData, fData);
}
示例14: switch
DDWORD ClientLightFX::EngineMessageFn(DDWORD messageID, void *pData, DFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
DDWORD dwRet = B2BaseClass::EngineMessageFn(messageID, pData, fData);
if (fData == PRECREATE_WORLDFILE || fData == PRECREATE_STRINGPROP)
{
m_bDynamic = DFALSE;
ReadProp((ObjectCreateStruct*)pData);
}
PostPropRead((ObjectCreateStruct*)pData);
return dwRet;
}
break;
case MID_INITIALUPDATE:
{
if (fData != INITIALUPDATE_SAVEGAME)
{
InitialUpdate((DVector *)pData);
}
CacheFiles();
break;
}
case MID_UPDATE:
{
if (!Update())
{
CServerDE* pServerDE = BaseClass::GetServerDE();
if (pServerDE) pServerDE->RemoveObject(m_hObject);
}
}
break;
case MID_SAVEOBJECT:
{
Save((HMESSAGEWRITE)pData, (DDWORD)fData);
}
break;
case MID_LOADOBJECT:
{
Load((HMESSAGEREAD)pData, (DDWORD)fData);
}
break;
default : break;
}
return B2BaseClass::EngineMessageFn(messageID, pData, fData);
}
示例15: switch
uint32 SoundFX::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_PRECREATE:
{
uint32 dwRet = BaseClass::EngineMessageFn(messageID, pData, fData);
if (fData == PRECREATE_WORLDFILE || fData == PRECREATE_STRINGPROP)
{
ReadProp((ObjectCreateStruct*)pData);
}
PostPropRead((ObjectCreateStruct*)pData);
return dwRet;
}
break;
case MID_INITIALUPDATE:
{
if (fData != INITIALUPDATE_SAVEGAME)
{
InitialUpdate();
}
CacheFiles();
}
break;
case MID_UPDATE:
{
if (m_hsndSound)
{
g_pLTServer->KillSound(m_hsndSound);
m_hsndSound = NULL;
}
}
break;
case MID_SAVEOBJECT:
{
Save((HMESSAGEWRITE)pData, (uint32)fData);
}
break;
case MID_LOADOBJECT:
{
Load((HMESSAGEREAD)pData, (uint32)fData);
}
break;
default : break;
}
return BaseClass::EngineMessageFn(messageID, pData, fData);
}