本文整理汇总了C++中uiimport_t::GetGlconfig方法的典型用法代码示例。如果您正苦于以下问题:C++ uiimport_t::GetGlconfig方法的具体用法?C++ uiimport_t::GetGlconfig怎么用?C++ uiimport_t::GetGlconfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uiimport_t
的用法示例。
在下文中一共展示了uiimport_t::GetGlconfig方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UI_Init
/*
=================
UI_Init
=================
*/
void UI_Init( int apiVersion, uiimport_t *uiimport )
{
gameinfo_import_t gameinfo_import;
ui = *uiimport;
if ( apiVersion != UI_API_VERSION ) {
ui.Error( ERR_FATAL, "Bad UI_API_VERSION: expected %i, got %i\n", UI_API_VERSION, apiVersion );
}
_UI_Init(qfalse);
// get static data (glconfig, media)
ui.GetGlconfig( &uis.glconfig );
uis.scaley = uis.glconfig.vidHeight * (1.0/480.0);
uis.scalex = uis.glconfig.vidWidth * (1.0/640.0);
gameinfo_import.FS_FOpenFile = ui.FS_FOpenFile;
gameinfo_import.FS_Read = ui.FS_Read;
gameinfo_import.FS_ReadFile = ui.FS_ReadFile;
gameinfo_import.FS_FreeFile = ui.FS_FreeFile;
gameinfo_import.FS_FCloseFile = ui.FS_FCloseFile;
gameinfo_import.Cvar_Set = ui.Cvar_Set;
gameinfo_import.Cvar_VariableStringBuffer = ui.Cvar_VariableStringBuffer;
gameinfo_import.Cvar_Create = ui.Cvar_Create;
gameinfo_import.Printf = ui.Printf;
// GI_Init( &gameinfo_import );
Menu_Cache( );
ui.Cvar_Create( "cg_drawCrosshair", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_marks", "1", CVAR_ARCHIVE );
ui.Cvar_Create ("s_language", "english", CVAR_ARCHIVE | CVAR_NORESTART);
}
示例2: UI_Init
/*
=================
UI_Init
=================
*/
void UI_Init( int apiVersion, uiimport_t *uiimport, qboolean inGameLoad )
{
ui = *uiimport;
if ( apiVersion != UI_API_VERSION ) {
ui.Error( ERR_FATAL, "Bad UI_API_VERSION: expected %i, got %i\n", UI_API_VERSION, apiVersion );
}
// get static data (glconfig, media)
ui.GetGlconfig( &uis.glconfig );
uis.scaley = uis.glconfig.vidHeight * (1.0/480.0);
uis.scalex = uis.glconfig.vidWidth * (1.0/640.0);
Menu_Cache( );
ui.Cvar_Create( "cg_drawCrosshair", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_marks", "1", CVAR_ARCHIVE );
ui.Cvar_Create ("s_language", "english", CVAR_ARCHIVE | CVAR_NORESTART);
#ifndef JK2_MODE
ui.Cvar_Create( "g_char_model", "jedi_tf", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_skin_head", "head_a1", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_skin_torso", "torso_a1", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_skin_legs", "lower_a1", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_color_red", "255", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_color_green", "255", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_color_blue", "255", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber_type", "single", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber", "single_1", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber2", "", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber_color", "yellow", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber2_color", "yellow", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "ui_forcepower_inc", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "tier_storyinfo", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "tiers_complete", "", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "ui_prisonerobj_currtotal", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "ui_prisonerobj_mintotal", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "g_dismemberment", "3", CVAR_ARCHIVE );//0 = none, 1 = arms and hands, 2 = legs, 3 = waist and head
ui.Cvar_Create( "cg_gunAutoFirst", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_crosshairIdentifyTarget", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "g_subtitles", "0", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_marks", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "d_slowmodeath", "3", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_shadows", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_runpitch", "0.002", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_runroll", "0.005", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_bobup", "0.005", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_bobpitch", "0.002", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_bobroll", "0.002", CVAR_ARCHIVE );
ui.Cvar_Create( "ui_disableWeaponSway", "0", CVAR_ARCHIVE );
#endif
_UI_Init(inGameLoad);
}