本文整理汇总了C++中CBinds::SetDDRaceBinds方法的典型用法代码示例。如果您正苦于以下问题:C++ CBinds::SetDDRaceBinds方法的具体用法?C++ CBinds::SetDDRaceBinds怎么用?C++ CBinds::SetDDRaceBinds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBinds
的用法示例。
在下文中一共展示了CBinds::SetDDRaceBinds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInit
void CGameClient::OnInit()
{
m_pGraphics = Kernel()->RequestInterface<IGraphics>();
// propagate pointers
m_UI.SetGraphics(Graphics(), TextRender());
m_RenderTools.m_pGraphics = Graphics();
m_RenderTools.m_pUI = UI();
int64 Start = time_get();
// set the language
g_Localization.Load(g_Config.m_ClLanguagefile, Storage(), Console());
// TODO: this should be different
// setup item sizes
for(int i = 0; i < NUM_NETOBJTYPES; i++)
Client()->SnapSetStaticsize(i, m_NetObjHandler.GetObjSize(i));
// load default font
static CFont *pDefaultFont = 0;
char aFilename[512];
IOHANDLE File = Storage()->OpenFile("fonts/DejaVuSans.ttf", IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
if(File)
{
io_close(File);
pDefaultFont = TextRender()->LoadFont(aFilename);
TextRender()->SetDefaultFont(pDefaultFont);
}
if(!pDefaultFont)
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load font. filename='fonts/DejaVuSans.ttf'");
// init all components
for(int i = m_All.m_Num-1; i >= 0; --i)
m_All.m_paComponents[i]->OnInit();
// setup load amount// load textures
for(int i = 0; i < g_pData->m_NumImages; i++)
{
g_pData->m_aImages[i].m_Id = Graphics()->LoadTexture(g_pData->m_aImages[i].m_pFilename, IStorage::TYPE_ALL, CImageInfo::FORMAT_AUTO, 0);
g_GameClient.m_pMenus->RenderLoading();
}
for(int i = 0; i < m_All.m_Num; i++)
m_All.m_paComponents[i]->OnReset();
int64 End = time_get();
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "initialisation finished after %.2fms", ((End-Start)*1000)/(float)time_freq());
Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "gameclient", aBuf);
m_ServerMode = SERVERMODE_PURE;
m_DDRaceMsgSent = false;
m_ShowOthers = -1;
// Set free binds to DDRace binds if it's active
if(!g_Config.m_ClDDRaceBindsSet && g_Config.m_ClDDRaceBinds)
gs_Binds.SetDDRaceBinds(true);
}