Example #1
0
void GUIFooter::SetText( const char16 * leftString, const char16 * rightString )
{
	GUIText *text = (GUIText*)GetByID(ECIDS_FOOTER_ID + 1);
	text->SetText(leftString);
	text = (GUIText*)GetByID(ECIDS_FOOTER_ID + 2);
	text->SetText(rightString);
}
Example #2
0
void GUIFooter::SetText( int16 leftStringID, int16 rightStringID )
{
	GUIText *text = (GUIText*)GetByID(ECIDS_FOOTER_ID + 1);
	text->SetText(leftStringID);
	text = (GUIText*)GetByID(ECIDS_FOOTER_ID + 2);
	text->SetText(rightStringID);
}
Example #3
0
CEDClient* CEDClients::Connect(DWORD nClientID, WORD nClientPort, IN_ADDR* pServerAddress, WORD nServerPort, GGUID* pGUID)
{
	if ( pGUID != NULL )
	{
		if ( CEDClient* pClient = GetByGUID( pGUID ) ) return pClient;
	}
	
	if ( IsFull() ) return NULL;
	
	CEDClient* pClient = NULL;
	
	if ( CEDPacket::IsLowID( nClientID ) )
	{
		if ( pServerAddress == NULL || nServerPort == 0 ) return NULL;
		pClient = GetByID( nClientID, pServerAddress, pGUID );
	}
	else
	{
		if ( Security.IsDenied( (IN_ADDR*)&nClientID ) ) return NULL;
		pClient = GetByID( nClientID, NULL, pGUID );
	}
	
	if ( pClient == NULL )
	{
		pClient = new CEDClient();
		pClient->ConnectTo( nClientID, nClientPort, pServerAddress, nServerPort, pGUID );
	}
	
	return pClient;
}
//----------------------------------------------------------------------------------------------
btSequentialImpulseConstraintSolver* TPhysicEngine_Bullet::GetSolver(int id_world)
{
  TWorld world;
  if(GetByID(id_world, world))
    return world.pSolver;

  return NULL;
}
//----------------------------------------------------------------------------------------------
btCollisionDispatcher* TPhysicEngine_Bullet::GetDispatcher(int id_world)
{
  TWorld world;
  if(GetByID(id_world, world))
    return world.pDispatcher;

  return NULL;
}
//----------------------------------------------------------------------------------------------
btBroadphaseInterface* TPhysicEngine_Bullet::GetBroadphase(int id_world)
{
  TWorld world;
  if(GetByID(id_world, world))
    return world.pBroadphase;

  return NULL;
}
//----------------------------------------------------------------------------------------------
btDiscreteDynamicsWorld* TPhysicEngine_Bullet::GetWorld(int id_world)
{
  TWorld world;
  if(GetByID(id_world, world))
    return world.pWorld;

  return NULL;
}
//----------------------------------------------------------------------------------------------
btDefaultCollisionConfiguration* TPhysicEngine_Bullet::GetCollisionConfiguration(int id_world)
{
  TWorld world;
  if(GetByID(id_world, world))
    return world.pCollisionConfiguration;

  return NULL;
}
//----------------------------------------------------------------------------------------------
btSequentialImpulseConstraintSolver* TPhysicEngine_Bullet::GetSolver(int id_world)
{
  TWorld* pWorld = GetByID(id_world);
  if(pWorld)
    return pWorld->pSolver;

  return NULL;
}
//----------------------------------------------------------------------------------------------
btDefaultCollisionConfiguration* TPhysicEngine_Bullet::GetCollisionConfiguration(int id_world)
{
  TWorld* pWorld = GetByID(id_world);
  if(pWorld)
    return pWorld->pCollisionConfiguration;

  return NULL;
}
//----------------------------------------------------------------------------------------------
btBroadphaseInterface* TPhysicEngine_Bullet::GetBroadphase(int id_world)
{
  TWorld* pWorld = GetByID(id_world);
  if(pWorld)
    return pWorld->pBroadphase;

  return NULL;
}
//----------------------------------------------------------------------------------------------
btCollisionDispatcher* TPhysicEngine_Bullet::GetDispatcher(int id_world)
{
  TWorld* pWorld = GetByID(id_world);
  if(pWorld)
    return pWorld->pDispatcher;

  return NULL;
}
//----------------------------------------------------------------------------------------------
void TPhysicEngine_Bullet::DeleteWorld(int id_world)
{
  TWorld world;
  if(GetByID(id_world, world))
    world.Done();

  mMapIDWorld.erase(id_world);
}
//----------------------------------------------------------------------------------------------
btDiscreteDynamicsWorld* TPhysicEngine_Bullet::GetWorld(int id_world)
{
  TWorld* pWorld = GetByID(id_world);
  if(pWorld)
    return pWorld->pWorld;

  return NULL;
}
Example #15
0
CEDClient* CEDClients::Connect(DWORD nClientID, WORD nClientPort, IN_ADDR* pServerAddress, WORD nServerPort, const Hashes::Guid& oGUID)
{
	CEDClient* pClient = NULL;

	{
		CQuickLock oLock( m_pSection );

		if ( oGUID )
		{
			pClient = GetByGUID( oGUID );
			if ( pClient )
				return pClient;
		}

		if ( IsFull() )
			return NULL;

		if ( CEDPacket::IsLowID( nClientID ) )
		{
			if ( pServerAddress == NULL || nServerPort == 0 )
				return NULL;

			pClient = GetByID( nClientID, pServerAddress, oGUID );
		}
		else
		{
			if ( Security.IsDenied( (IN_ADDR*)&nClientID ) )
				return NULL;

			pClient = GetByID( nClientID, NULL, oGUID );
		}
	}

	if ( pClient == NULL )
	{
		pClient = new CEDClient();
		pClient->ConnectTo( nClientID, nClientPort, pServerAddress, nServerPort, oGUID );
	}

	return pClient;
}
C4RoundResultsPlayer *C4RoundResultsPlayers::GetCreateByID(int32_t id)
{
	assert(id);
	// find existing
	C4RoundResultsPlayer *pPlr = GetByID(id);
	// not found: Add new
	if (!pPlr)
	{
		pPlr = new C4RoundResultsPlayer();
		pPlr->SetID(id);
		Add(pPlr);
	}
	return pPlr;
}
// Get an entry by name
CvNotificationEntry* CvNotificationXMLEntries::GetByString(const char* pszName)
{
	if (pszName && pszName[0] != 0)
		return GetByID(FString::Hash(pszName));
	return NULL;
}
//----------------------------------------------------------------------------------------------
void TPhysicEngine_Bullet::DeleteWorld(int id_world)
{
  TWorld* pWorld = GetByID(id_world);
  delete pWorld;
  mMapIDWorld.erase(id_world);
}
Example #19
0
void GUIFooter::SetNegativeText( int16 rightStringID )
{
	GUIText *text = (GUIText*)GetByID(ECIDS_FOOTER_ID + 2);
	text->SetText(rightStringID);
}
Example #20
0
void GUIFooter::SetPositiveText( int16 leftStringID )
{
	GUIText *text = (GUIText*)GetByID(ECIDS_FOOTER_ID + 1);
	text->SetText(leftStringID);
}