当前位置: 首页>>代码示例>>C++>>正文


C++ CGameClient类代码示例

本文整理汇总了C++中CGameClient的典型用法代码示例。如果您正苦于以下问题:C++ CGameClient类的具体用法?C++ CGameClient怎么用?C++ CGameClient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CGameClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetGameClient

int CAddonCallbacksGame::OpenAudioStream(void* addonData, GAME_AUDIO_CODEC codec, const GAME_AUDIO_CHANNEL* channel_map)
{
  CGameClient* gameClient = GetGameClient(addonData, __FUNCTION__);
  if (!gameClient)
    return -1;

  return gameClient->OpenAudioStream(codec, channel_map) ? 0 : -1;
}
开发者ID:Elzevir,项目名称:xbmc,代码行数:8,代码来源:AddonCallbacksGame.cpp

示例2: cb_close_port

void CGameClient::cb_close_port(void* kodiInstance, unsigned int port)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return;

  gameClient->ClosePort(port);
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GameClient.cpp

示例3: cb_open_pixel_stream

int CGameClient::cb_open_pixel_stream(void* kodiInstance, GAME_PIXEL_FORMAT format, unsigned int width, unsigned int height, GAME_VIDEO_ROTATION rotation)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return -1;

  return gameClient->OpenPixelStream(format, width, height, rotation) ? 0 : -1;
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GameClient.cpp

示例4: cb_close_stream

void CGameClient::cb_close_stream(void* kodiInstance, GAME_STREAM_TYPE stream)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return;

  gameClient->CloseStream(stream);
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GameClient.cpp

示例5: cb_open_port

bool CGameClient::cb_open_port(void* kodiInstance, unsigned int port)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return false;

  return gameClient->OpenPort(port);
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GameClient.cpp

示例6: cb_open_audio_stream

int CGameClient::cb_open_audio_stream(void* kodiInstance, GAME_AUDIO_CODEC codec, const GAME_AUDIO_CHANNEL* channel_map)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return -1;

  return gameClient->OpenAudioStream(codec, channel_map) ? 0 : -1;
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GameClient.cpp

示例7: cb_add_stream_data

void CGameClient::cb_add_stream_data(void* kodiInstance, GAME_STREAM_TYPE stream, const uint8_t* data, unsigned int size)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return;

  gameClient->AddStreamData(stream, data, size);
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GameClient.cpp

示例8: cb_open_pcm_stream

int CGameClient::cb_open_pcm_stream(void* kodiInstance, GAME_PCM_FORMAT format, const GAME_AUDIO_CHANNEL* channel_map)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return -1;

  return gameClient->OpenPCMStream(format, channel_map) ? 0 : -1;
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GameClient.cpp

示例9: cb_open_video_stream

int CGameClient::cb_open_video_stream(void* kodiInstance, GAME_VIDEO_CODEC codec)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return -1;

  return gameClient->OpenVideoStream(codec) ? 0 : -1;
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GameClient.cpp

示例10: pfnCallback

void CGameClient::ConchainFriendUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
{
	pfnCallback(pResult, pCallbackUserData);
	CGameClient *pClient = static_cast<CGameClient *>(pUserData);
	for(int i = 0; i < MAX_CLIENTS; ++i)
	{
		if(pClient->m_aClients[i].m_Active)
			pClient->m_aClients[i].m_Friend = pClient->Friends()->IsFriend(pClient->m_aClients[i].m_aName, pClient->m_aClients[i].m_aClan, true);
	}
}
开发者ID:Learath2,项目名称:teeworlds,代码行数:10,代码来源:gameclient.cpp

示例11: cb_input_event

bool CGameClient::cb_input_event(void* kodiInstance, const game_input_event* event)
{
  CGameClient *gameClient = static_cast<CGameClient*>(kodiInstance);
  if (!gameClient)
    return false;

  if (event == nullptr)
    return false;

  return gameClient->Input().ReceiveInputEvent(*event);
}
开发者ID:sagiben,项目名称:xbmc,代码行数:11,代码来源:GameClient.cpp

示例12: GetGameClient

bool CAddonCallbacksGame::InputEvent(void* addonData, const game_input_event* event)
{
  CGameClient* gameClient = GetGameClient(addonData, __FUNCTION__);
  if (!gameClient)
    return false;

  if (event == nullptr)
    return false;

  return gameClient->ReceiveInputEvent(*event);
}
开发者ID:aerickson,项目名称:xbmc,代码行数:11,代码来源:AddonCallbacksGame.cpp

示例13: RenderTilemapGenerateSkipThread

void CGameClient::RenderTilemapGenerateSkipThread(void *pUser)
{
    CGameClient *pSelf = (CGameClient *)pUser;
    if (pSelf->RenderTilemapGenerateSkipThreadStatus == 1)
    {
        return;
    }
    pSelf->RenderTilemapGenerateSkipThreadStatus = 1;
    pSelf->RenderTools()->RenderTilemapGenerateSkip(pSelf->Layers());
    pSelf->RenderTilemapGenerateSkipThreadStatus = 0;
}
开发者ID:Parhamic,项目名称:teeworlds,代码行数:11,代码来源:gameclient.cpp

示例14: Assert

CClientFrame *CGameClient::GetSendFrame()
{
	CClientFrame *pFrame = m_pCurrentFrame;

	// just return if replay is disabled
	if ( sv_maxreplay.GetFloat() <= 0 )
		return pFrame;
			
	int followEntity;

	int delayTicks = serverGameClients->GetReplayDelay( edict, followEntity );

	bool isInReplayMode = ( delayTicks > 0 );

	if ( isInReplayMode != m_bIsInReplayMode )
	{
		// force a full update when modes are switched
		m_nDeltaTick = -1; 

		m_bIsInReplayMode = isInReplayMode;

		if ( isInReplayMode )
		{
			m_nEntityIndex = followEntity;
		}
		else
		{
			m_nEntityIndex = m_nClientSlot+1;
		}
	}

	Assert( (m_nClientSlot+1 == m_nEntityIndex) || isInReplayMode );

	if ( isInReplayMode )
	{
		CGameClient *pFollowPlayer = sv.Client( followEntity-1 );

		if ( !pFollowPlayer )
			return NULL;

		pFrame = pFollowPlayer->GetClientFrame( sv.GetTick() - delayTicks, false );

		if ( !pFrame )
			return NULL;

		if ( m_pLastSnapshot == pFrame->GetSnapshot() )
			return NULL;
	}

	return pFrame;
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:51,代码来源:sv_client.cpp

示例15: GetControllers

ControllerVector CGameClientInput::GetControllers(const CGameClient &gameClient)
{
  using namespace ADDON;

  ControllerVector controllers;

  CGameServices& gameServices = CServiceBroker::GetGameServices();

  const auto& dependencies = gameClient.GetDependencies();
  for (auto it = dependencies.begin(); it != dependencies.end(); ++it)
  {
    ControllerPtr controller = gameServices.GetController(it->id);
    if (controller)
      controllers.push_back(controller);
  }

  if (controllers.empty())
  {
    // Use the default controller
    ControllerPtr controller = gameServices.GetDefaultController();
    if (controller)
      controllers.push_back(controller);
  }

  return controllers;
}
开发者ID:intrcomp,项目名称:xbmc,代码行数:26,代码来源:GameClientInput.cpp


注:本文中的CGameClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。