示例#1
0
void Movie_Init(void) {
	Cvar_SetCurrentGroup(CVAR_GROUP_DEMO);
	Cvar_Register(&movie_fps);
	Cvar_Register(&movie_dir);
	Cvar_Register(&movie_steadycam);

	Cvar_ResetCurrentGroup();

	Cmd_AddCommand("demo_capture", Movie_Demo_Capture_f);

#ifdef _WIN32
	Capture_InitAVI ();		//joe: capturing to avi
	if (!movie_avi_loaded)
		return;

	captured_audio_samples = 0;
	Cvar_SetCurrentGroup(CVAR_GROUP_DEMO);
	Cvar_Register(&movie_codec);
	Cvar_Register(&movie_vid_maxlen);
	Cvar_Register(&movie_quietcapture);

	Cvar_ResetCurrentGroup();

	Capture_InitACM ();
	if (!movie_acm_loaded)
		return;

	Cvar_SetCurrentGroup(CVAR_GROUP_DEMO);
	Cvar_Register(&movie_mp3);
	Cvar_Register(&movie_mp3_kbps);

	Cvar_ResetCurrentGroup();
#endif
}
示例#2
0
void IN_Init (void)
{
	Cvar_SetCurrentGroup (CVAR_GROUP_INPUT_MOUSE);
	Cvar_Register (&m_filter);

	Cvar_SetCurrentGroup (CVAR_GROUP_INPUT_KEYBOARD);
	Cvar_Register (&cl_keypad);
	Cvar_ResetCurrentGroup ();

	if (!host_initialized)
	{
		/* FIXME: Decide whether to have nomouse option or not
		if (COM_CheckParm ("-nomouse"))
			;
		*/

		Cmd_AddCommand("in_restart", IN_Restart_f);
	}

#ifdef __APPLE__
	extern cvar_t in_raw;
	if (in_raw.integer > 0) {
		if (OSX_Mouse_Init() != 0) {
			Com_Printf("warning: failed to initialize raw input mouse thread...\n");
			Cvar_SetValue(&in_raw, 0);
		}
	}
#endif

	IN_StartupMouse ();
}
示例#3
0
void MVD_Utils_Init (void) {
	MVD_AutoTrack_Init();
	MVD_XMLStats_Init();

	Cvar_SetCurrentGroup(CVAR_GROUP_MVD);
	Cvar_Register (&mvd_info);
	Cvar_Register (&mvd_info_show_header);
	Cvar_Register (&mvd_info_setup);
	Cvar_Register (&mvd_info_x);
	Cvar_Register (&mvd_info_y);

	Cvar_Register (&mvd_status);
	Cvar_Register (&mvd_status_x);
	Cvar_Register (&mvd_status_y);

	Cvar_Register (&mvd_powerup_cam);

	Cvar_Register (&mvd_pc_quad_1);
	Cvar_Register (&mvd_pc_quad_2);
	Cvar_Register (&mvd_pc_quad_3);

	Cvar_Register (&mvd_pc_pent_1);
	Cvar_Register (&mvd_pc_pent_2);
	Cvar_Register (&mvd_pc_pent_3);

	Cvar_Register (&mvd_pc_view_1);
	Cvar_Register (&mvd_pc_view_2);
	Cvar_Register (&mvd_pc_view_3);
	Cvar_Register (&mvd_pc_view_4);

	Cvar_Register (&mvd_moreinfo);

	Cvar_ResetCurrentGroup();
}
示例#4
0
void Cvar_Init (void)
{
	Cmd_AddCommand ("cvarlist", Cvar_CvarList_f);
	Cmd_AddCommand ("cvarlist_re", Cvar_CvarList_re_f);
	Cmd_AddCommand ("set", Cvar_Set_f);
	Cmd_AddCommand ("set_tp", Cvar_Set_tp_f);
	Cmd_AddCommand ("set_ex", Cvar_Set_ex_f);
	Cmd_AddCommand ("set_alias_str", Cvar_Set_Alias_Str_f);
	Cmd_AddCommand ("set_bind_str", Cvar_Set_Bind_Str_f);
	Cmd_AddCommand ("unset", Cvar_UnSet_f);
	Cmd_AddCommand ("unset_re", Cvar_UnSet_re_f);
	Cmd_AddCommand ("toggle", Cvar_Toggle_f);
	Cmd_AddCommand ("toggle_re", Cvar_Toggle_re_f);
	Cmd_AddCommand ("cvar_reset", Cvar_Reset_f);
	Cmd_AddCommand ("cvar_reset_re", Cvar_Reset_re_f);
	Cmd_AddCommand ("inc", Cvar_Inc_f);
	Cmd_AddCommand ("set_calc", Cvar_Set_Calc_f);
	Cmd_AddCommand ("set_eval", Cvar_Set_Eval_f);

	Cvar_SetCurrentGroup(CVAR_GROUP_CONSOLE);
	Cvar_Register (&cvar_viewdefault);
	Cvar_Register (&cvar_viewhelp);
	Cvar_Register (&cvar_viewlatched);

	Cvar_ResetCurrentGroup();
}
void ConfigManager_Init(void)
{
	Cmd_AddCommand("cfg_save", SaveConfig_f);
	Cmd_AddCommand("cfg_load", LoadConfig_f);
	Cmd_AddCommand("cfg_reset",	ResetConfigs_f);
	Cmd_AddCommand("hud_export", DumpHUD_f);
	Cmd_AddCommand("dump_defaults", DumpVariablesDefaults_f);
	Cmd_AddCommand("legacyquake", Config_LegacyQuake_f);
	Cmd_AddCommand("troubleshoot", Config_TroubleShoot_f);

	Cvar_SetCurrentGroup(CVAR_GROUP_CONFIG);
	Cvar_Register(&cfg_save_unchanged);
	Cvar_Register(&cfg_save_userinfo);
	Cvar_Register(&cfg_save_onquit);
	Cvar_Register(&cfg_save_cvars);
	Cvar_Register(&cfg_save_aliases);
	Cvar_Register(&cfg_save_cmds);
	Cvar_Register(&cfg_save_binds);
	Cvar_Register(&cfg_save_cmdline);
	Cvar_Register(&cfg_save_sysinfo);
	Cvar_Register(&cfg_backup);
	Cvar_Register(&cfg_legacy_exec);
	Cvar_Register(&cfg_use_home);
	Cvar_Register(&cfg_use_gamedir);
	Cvar_ResetCurrentGroup();
}
示例#6
0
文件: in_linux.c 项目: jogi1/camquake
void IN_Init (void)
{
#ifdef GLQUAKE
#ifdef WITH_EVDEV
	int i;
#endif
#endif

	Cvar_SetCurrentGroup (CVAR_GROUP_INPUT_MOUSE);
	Cvar_Register (&m_filter);
#ifndef _Soft_SVGA
	Cvar_Register (&_windowed_mouse);
#endif

	Cvar_SetCurrentGroup (CVAR_GROUP_INPUT_KEYBOARD);
	Cvar_Register (&cl_keypad);
	Cvar_ResetCurrentGroup ();

	if (!host_initialized)
	{
#ifdef GLQUAKE
		typedef enum { mt_none = 0, mt_dga, mt_normal, mt_evdev } mousetype_t;
		extern cvar_t in_mouse;
#ifdef WITH_EVDEV
		extern cvar_t in_mmt;
		extern cvar_t in_evdevice;
#endif /* !WITH_EVDEV */

		if (COM_CheckParm ("-nodga") || COM_CheckParm ("-nomdga"))
			Cvar_LatchedSetValue (&in_mouse, mt_normal);

#ifdef WITH_EVDEV
		if ((i = COM_CheckParm ("-mevdev")) && (i < COM_Argc() - 1)) {
			Cvar_LatchedSet (&in_evdevice, COM_Argv(i + 1));
			Cvar_LatchedSetValue (&in_mouse, mt_evdev);
		}

		if (COM_CheckParm ("-mmt"))
			Cvar_LatchedSetValue (&in_mmt, 1);
#endif /* !WITH_EVDEV */

		if (COM_CheckParm ("-nomouse"))
			Cvar_LatchedSetValue (&in_mouse, mt_none);

#ifdef WITH_EVDEV
		extern void IN_EvdevList_f(void);
		Cmd_AddCommand ("in_evdevlist", IN_EvdevList_f);
#endif /* !WITH_EVDEV */
#endif /* !GLQUAKE */

#ifdef WITH_KEYMAP
		IN_StartupKeymap();
#endif // WITH_KEYMAP
#ifdef GLQUAKE
		Cmd_AddCommand ("in_restart", IN_Restart_f);
#endif
	}

	IN_StartupMouse ();
}
示例#7
0
void Menu_Options_Init(void) {
	Settings_MainInit();

	Settings_Page_Init(settmisc, settmisc_arr);
	Settings_Page_Init(settfps, settfps_arr);
	Settings_Page_Init(settview, settview_arr);
	Settings_Page_Init(settplayer, settplayer_arr);
	Settings_Page_Init(settbinds, settbinds_arr);
	Settings_Page_Init(settsystem, settsystem_arr);
	Settings_Page_Init(settconfig, settconfig_arr);

	Cvar_SetCurrentGroup(CVAR_GROUP_MENU);
	Cvar_Register(&menu_advanced);
	Cvar_ResetCurrentGroup();

	FL_Init(&configs_filelist, "./ezquake/configs");
	FL_SetDirUpOption(&configs_filelist, false);
	FL_SetDirsOption(&configs_filelist, false);
	FL_AddFileType(&configs_filelist, 0, ".cfg");
	FL_AddFileType(&configs_filelist, 1, ".txt");

	CEditBox_Init(&filenameeb, 32, 64);

	CTab_Init(&options_tab);
	CTab_AddPage(&options_tab, "Player", OPTPG_PLAYER, &options_player_handlers);
	CTab_AddPage(&options_tab, "Graphics", OPTPG_FPS, &options_graphics_handlers);
	CTab_AddPage(&options_tab, "View", OPTPG_HUD, &options_view_handlers);
	CTab_AddPage(&options_tab, "Controls", OPTPG_BINDS, &options_controls_handlers);
	CTab_AddPage(&options_tab, "Misc", OPTPG_MISC, &options_misc_handlers);
	CTab_AddPage(&options_tab, "System", OPTPG_SYSTEM, &options_system_handlers);
	CTab_AddPage(&options_tab, "Config", OPTPG_CONFIG, &options_config_handlers);
	CTab_SetCurrentId(&options_tab, OPTPG_PLAYER);
}
示例#8
0
void COM_Init (void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_NO_GROUP);
	Cvar_Register (&developer);
	Cvar_Register (&host_mapname);

	Cvar_ResetCurrentGroup();
}
示例#9
0
void MP3_WINAMP_Init(void)
{
	if (host_initialized && Cvar_Find(mp3_dir.name))
		return;

	Cvar_SetCurrentGroup(CVAR_GROUP_MP3);
	Cvar_Register(&mp3_dir);
	Cvar_ResetCurrentGroup();
}
示例#10
0
文件: logging.c 项目: jogi1/camquake
void Log_Init(void) {
	Cvar_SetCurrentGroup(CVAR_GROUP_CONSOLE);
	Cvar_Register (&log_dir);
	Cvar_Register (&log_readable);

	Cvar_ResetCurrentGroup();

	Cmd_AddCommand("log", Log_log_f);
}
示例#11
0
//Try to find a sound device to mix for.
//Returns false if nothing is found.
qbool SNDDMA_Init(void)
{
	sndinitstat stat;

	Cvar_SetCurrentGroup(CVAR_GROUP_SOUND);
	Cvar_Register (&sys_inactivesound);
	Cvar_ResetCurrentGroup ();

	if (COM_CheckParm ("-wavonly"))
		wavonly = true;

	dsound_init = wav_init = 0;

	stat = SIS_FAILURE; // assume DirectSound won't initialize

	/* Init DirectSound */
	if (!wavonly) {
		if (snd_firsttime || snd_isdirect) {
			stat = SNDDMA_InitDirect ();

			if (stat == SIS_SUCCESS) {
				snd_isdirect = true;

				if (snd_firsttime)
					Com_Printf_State (PRINT_OK, "DirectSound initialized\n");
			} else {
				snd_isdirect = false;
				Com_Printf_State (PRINT_FAIL, "DirectSound failed to init\n");
			}
		}
	}

	// if DirectSound didn't succeed in initializing, try to initialize waveOut sound
	if (!dsound_init) {
		if (snd_firsttime || snd_iswave) {
			snd_iswave = SNDDMA_InitWav ();

			if (snd_iswave) {
				if (snd_firsttime)
					Com_Printf_State (PRINT_OK, "Wave sound initialized\n");
			} else {
				Com_Printf_State (PRINT_FAIL, "Wave sound failed to init\n");
			}
		}
	}

	snd_firsttime = false;

	if (!dsound_init && !wav_init) {
		if (snd_firsttime)
			Com_Printf_State (PRINT_INFO, "No sound device initialized\n");

		return false;
	}

	return true;
}
示例#12
0
void CL_CvarInitCam(void) {
	Cvar_SetCurrentGroup(CVAR_GROUP_SPECTATOR);
	Cvar_Register (&cl_chasecam);

	Cvar_ResetCurrentGroup();
	Cmd_AddCommand ("track", CL_Track_f);

	CSTC_Add("track", &cstc_track_conditions, &cstc_track_results, NULL, NULL, CSTC_EXECUTE, "arrow up/down to navigate");
}
示例#13
0
void IN_StartupJoystick (void) { 
	int value = 0;
        char joy_desc[1024];
 
 	// assume no joystick
	joy_avail = false; 

	// only initialize if the user wants it
	if (!COM_CheckParm ("-joystick")) 
		return; 

	Cvar_SetCurrentGroup(CVAR_GROUP_INPUT_JOY);
	Cvar_Register (&joy_name);
	Cvar_Register (&joy_advanced);
	Cvar_Register (&joy_advaxisx);
	Cvar_Register (&joy_advaxisy);
	Cvar_Register (&joy_advaxisz);
	Cvar_Register (&joy_advaxisr);
	Cvar_Register (&joy_advaxisu);
	Cvar_Register (&joy_advaxisv);
	Cvar_Register (&joy_forwardthreshold);
	Cvar_Register (&joy_sidethreshold);
	Cvar_Register (&joy_flythreshold);
	Cvar_Register (&joy_pitchthreshold);
	Cvar_Register (&joy_yawthreshold);
	Cvar_Register (&joy_forwardsensitivity);
	Cvar_Register (&joy_sidesensitivity);
	Cvar_Register (&joy_flysensitivity);
	Cvar_Register (&joy_pitchsensitivity);
	Cvar_Register (&joy_yawsensitivity);
	Cvar_Register (&joy_wwhack1);
	Cvar_Register (&joy_wwhack2);
	Cvar_ResetCurrentGroup();

	joystick = open (JOYSTICK_DEVICE_S, O_RDONLY|O_NONBLOCK);
        if (joystick == 0) {
		Com_Printf ("\njoystick not found -- driver not present\n\n");
		return;
        }

        // save the joystick's number of buttons and POV status
        ioctl (joystick, JSIOCGNAME (sizeof (joy_desc)), joy_desc);
        ioctl (joystick, JSIOCGBUTTONS, &value);
	joy_numbuttons = value;
	joy_haspov = 0;

	// old button and POV states default to no buttons pressed
	joy_oldbuttonstate = joy_oldpovstate = 0;

	// mark the joystick as available and advanced initialization not completed
	// this is needed as cvars are not available during initialization
	joy_avail = true; 
	joy_advancedinit = false;

	Com_Printf ("\njoystick detected (%s, %d buttons)\n\n", joy_desc, joy_numbuttons); 

}
示例#14
0
void Sys_CvarInit(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_SYSTEM_SETTINGS);
	Cvar_Register(&sys_inactivesound);
	Cvar_Register(&sys_inactivesleep);
	Cvar_Register(&sys_disable_alt_enter);
	Cvar_ResetCurrentGroup();

	Cmd_AddCommand("batteryinfo", Sys_BatteryInfo_f);
}
示例#15
0
void Movie_CvarInit(void) {
	Cvar_SetCurrentGroup(CVAR_GROUP_DEMO);
	Cvar_Register(&movie_fps);
	Cvar_Register(&movie_dir);
	Cvar_Register(&movie_steadycam);

	Cvar_ResetCurrentGroup();

	Cmd_AddCommand("demo_capture", Movie_Demo_Capture_f);
}
示例#16
0
void Con_CvarInit(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_CONSOLE);
	Cvar_Register(&con_notifylines);
	Cvar_Register(&con_notifytime);
	Cvar_Register(&con_parsecolors);
	Cvar_ResetCurrentGroup();

	Cmd_AddCommand("clear", Con_Clear);
}
示例#17
0
void Sys_Init(void) {
	if (dedicated) {
		Cvar_Register (&sys_nostdout);
		Cvar_Register (&sys_extrasleep);
	}
	else {
    Cvar_SetCurrentGroup(CVAR_GROUP_SYSTEM_SETTINGS);
    Cvar_Register (&sys_yieldcpu);
    Cvar_ResetCurrentGroup();
	}
}
示例#18
0
void FChecks_Init (void)
{
	Cvar_SetCurrentGroup (CVAR_GROUP_CHAT);
	Cvar_Register (&allow_f_system);
	Cvar_Register (&allow_f_cmdline);
	Cvar_ResetCurrentGroup();

	FMod_Init();
	Cmd_AddCommand ("f_server", FChecks_FServerResponse);
	Cmd_AddCommand ("f_ruleset", FChecks_FRuleset_cmd);
}
示例#19
0
void QTVList_Init(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_SERVER_BROWSER);

	Cvar_Register(&sb_qtvlist_url);

	Cvar_ResetCurrentGroup();

	Cmd_AddCommand("observeqtv", QTVList_Observeqtv_f);

	QTVList_Initialize_Streammap();
}
示例#20
0
文件: sv_ccmds.c 项目: jogi1/camquake
void SV_InitOperatorCommands (void) {
	Cvar_SetCurrentGroup(CVAR_GROUP_SERVER_MAIN);
	Cvar_Register (&sv_floodprotmsg);
	Cvar_Register (&sv_cheats);

	Cvar_ResetCurrentGroup();

	if (COM_CheckParm ("-cheats")) {
		sv_allow_cheats = true;
		Cvar_SetValue (&sv_cheats, 1);
		Info_SetValueForStarKey (svs.info, "*cheats", "ON", MAX_SERVERINFO_STRING);
	}

	Cmd_AddCommand ("fraglogfile", SV_Fraglogfile_f);

	Cmd_AddCommand ("snap", SV_Snap_f);
	Cmd_AddCommand ("snapall", SV_SnapAll_f);
	Cmd_AddCommand ("kick", SV_Kick_f);
	Cmd_AddCommand ("status", SV_Status_f);
	Cmd_AddCommand ("serverstatus", SV_Status_f);

	Cmd_AddCommand ("map", SV_Map_f);
	Cmd_AddCommand ("devmap", SV_Map_f);

	Cmd_AddCommand ("setmaster", SV_SetMaster_f);
	Cmd_AddCommand ("heartbeat", SV_Heartbeat_f);

	if (dedicated) {
		Cmd_AddCommand ("say", SV_ConSay_f);
		Cmd_AddCommand ("quit", SV_Quit_f);
		Cmd_AddCommand ("user", SV_User_f);
		Cmd_AddCommand ("serverinfo", SV_Serverinfo_f);
	}

#ifndef SERVERONLY
	if (!dedicated) { 
		Cmd_AddCommand ("save", SV_SaveGame_f); 
		Cmd_AddCommand ("load", SV_LoadGame_f); 
	} 
#endif

	Cmd_AddCommand ("localinfo", SV_Localinfo_f);
	Cmd_AddCommand ("gamedir", SV_Gamedir_f);
	Cmd_AddCommand ("sv_gamedir", SV_Gamedir);

	cl_warncmd.value = 1;
}
示例#21
0
void EX_FileList_Init(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_MENU);
    Cvar_Register(&file_browser_show_size);
    Cvar_Register(&file_browser_show_date);
    Cvar_Register(&file_browser_show_time);
    Cvar_Register(&file_browser_sort_mode);
    Cvar_Register(&file_browser_show_status);
    Cvar_Register(&file_browser_strip_names);
    Cvar_Register(&file_browser_interline);
	Cvar_Register(&file_browser_scrollnames);
	Cvar_Register(&file_browser_file_color);
	Cvar_Register(&file_browser_selected_color);
	Cvar_Register(&file_browser_dir_color);
	Cvar_Register(&file_browser_archive_color);
	Cvar_ResetCurrentGroup();
}
示例#22
0
void VID_RegisterLatchCvars(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_VIDEO);

	Cvar_Register(&vid_width);
	Cvar_Register(&vid_height);
	Cvar_Register(&vid_win_width);
	Cvar_Register(&vid_win_height);
	Cvar_Register(&r_allowExtensions);
	Cvar_Register(&r_colorbits);
	Cvar_Register(&r_stencilbits);
	Cvar_Register(&r_depthbits);
	Cvar_Register(&r_fullscreen);
	Cvar_Register(&r_displayRefresh);
	Cvar_Register(&vid_win_borderless);
	Cvar_Register(&gl_multisamples);

	Cvar_ResetCurrentGroup();
}
示例#23
0
void VID_RegisterCvars(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_VIDEO);

	Cvar_Register(&vid_vsync_lag_fix);
	Cvar_Register(&vid_vsync_lag_tweak);
	Cvar_Register(&r_win_save_pos);
	Cvar_Register(&r_win_save_size);
	Cvar_Register(&r_swapInterval);
	Cvar_Register(&r_verbose);
	Cvar_Register(&vid_xpos);
	Cvar_Register(&vid_ypos);
	Cvar_Register(&r_conwidth);
	Cvar_Register(&r_conheight);
	Cvar_Register(&vid_flashonactivity);
	Cvar_Register(&r_showextensions);

	Cvar_ResetCurrentGroup();
}
示例#24
0
void VID_CvarInit()
{
	Cvar_SetCurrentGroup(CVAR_GROUP_VIDEO);
	Cvar_Register(&vid_ref);
	Cvar_Register(&vid_fullscreen);
	Cvar_Register(&vid_width);
	Cvar_Register(&vid_height);
	Cvar_Register(&vid_mode);
	Cvar_Register(&vid_conwidth);
	Cvar_Register(&vid_conheight);

	Cvar_SetCurrentGroup(CVAR_GROUP_INPUT_MOUSE);
	Cvar_Register(&in_grab_windowed_mouse);
	Cmd_AddLegacyCommand("_windowed_mouse", "in_grab_windowed_mouse");
	Cvar_ResetCurrentGroup();

	Cmd_AddCommand("vid_restart", VID_Restart);

	Sys_Video_CvarInit();
}
示例#25
0
void Menu_Options_Init(void) {
	Settings_MainInit();

	Settings_Page_Init(settmisc, settmisc_arr);
	Settings_Page_Init(settfps, settfps_arr);
	Settings_Page_Init(settview, settview_arr);
	Settings_Page_Init(settplayer, settplayer_arr);
	Settings_Page_Init(settbinds, settbinds_arr);
	Settings_Page_Init(settsystem, settsystem_arr);
	Settings_Page_Init(settconfig, settconfig_arr);

	Cvar_SetCurrentGroup(CVAR_GROUP_MENU);
	Cvar_Register(&menu_advanced);
	Cvar_ResetCurrentGroup();

	// this is here just to not get a crash in Cvar_Set
	mss_selected.freq.name = "menu_tempval_video_freq";
	mss_previous.freq.name = mss_selected.freq.name;
	mss_selected.freq.string = NULL;
	mss_previous.freq.string = NULL;
	mss_selected.freq.next = &mss_selected.freq;
	mss_previous.freq.next = &mss_previous.freq;

	FL_Init(&configs_filelist, "./ezquake/configs");
	FL_SetDirUpOption(&configs_filelist, false);
	FL_SetDirsOption(&configs_filelist, false);
	FL_AddFileType(&configs_filelist, 0, ".cfg");
	FL_AddFileType(&configs_filelist, 1, ".txt");

	CEditBox_Init(&filenameeb, 32, 64);

	CTab_Init(&options_tab);
	CTab_AddPage(&options_tab, "Player", OPTPG_PLAYER, &options_player_handlers);
	CTab_AddPage(&options_tab, "Graphics", OPTPG_FPS, &options_graphics_handlers);
	CTab_AddPage(&options_tab, "View", OPTPG_HUD, &options_view_handlers);
	CTab_AddPage(&options_tab, "Controls", OPTPG_BINDS, &options_controls_handlers);
	CTab_AddPage(&options_tab, "Misc", OPTPG_MISC, &options_misc_handlers);
	CTab_AddPage(&options_tab, "System", OPTPG_SYSTEM, &options_system_handlers);
	CTab_AddPage(&options_tab, "Config", OPTPG_CONFIG, &options_config_handlers);
	CTab_SetCurrentId(&options_tab, OPTPG_PLAYER);
}
示例#26
0
void qtvlist_init(void)
{
	Cmd_AddCommand("qtv", qtvlist_qtv_cmd);
	Cmd_AddCommand("find", qtvlist_find_player_cmd);
	Cmd_AddCommand("find_update", qtvlist_spawn_updater);
	Cmd_AddCommand("observeqtv", qtvlist_qtv_cmd); /* For backwards compat */
	Cmd_AddCommand("qtv_update", qtvlist_spawn_updater);

	Cvar_SetCurrentGroup(CVAR_GROUP_QTV);
	Cvar_Register(&qtv_api_url);
	Cvar_ResetCurrentGroup();

	qtvlist_mutex = SDL_CreateMutex();
	if (qtvlist_mutex == NULL) {
		Com_Printf("error: failed to initialize qtvlist mutex\n");
		Com_Printf("error: qtv/observeqtv commands won't work...\n");
		return;
	}

	/* Initialize by running the updater at startup */
	qtvlist_spawn_updater();
}
示例#27
0
void TP_InitTriggers (void)
{
	unsigned i;
 
	for(i=0;i<10;i++)
		Cvar_Register (re_sub+i);
 
	Cmd_AddCommand ("re_trigger", CL_RE_Trigger_f);
	Cmd_AddCommand ("re_trigger_options", CL_RE_Trigger_Options_f);
	Cmd_AddCommand ("re_trigger_delete", CL_RE_Trigger_Delete_f);
	Cmd_AddCommand ("re_trigger_enable", CL_RE_Trigger_Enable_f);
	Cmd_AddCommand ("re_trigger_disable", CL_RE_Trigger_Disable_f);
	Cmd_AddCommand ("re_trigger_match", CL_RE_Trigger_Match_f);
	InitInternalTriggers();

	Cvar_SetCurrentGroup(CVAR_GROUP_COMMUNICATION);
	Cvar_Register (&tp_msgtriggers);
	Cvar_Register (&tp_soundtrigger);
	Cvar_Register (&tp_triggers);
	Cvar_Register (&tp_forceTriggers);
	Cvar_ResetCurrentGroup();
}
示例#28
0
void Menu_Demo_Init(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_SCREEN);
	Cvar_Register (&demo_playlist_loop);
	Cvar_Register (&demo_playlist_track_name);
	Cvar_ResetCurrentGroup();

	Cmd_AddCommand ("demo_playlist_stop", M_Demo_Playlist_Stop_f);
	Cmd_AddCommand ("demo_playlist_next", M_Demo_Playlist_Next_f);
	Cmd_AddCommand ("demo_playlist_prev", M_Demo_Playlist_Prev_f);
	Cmd_AddCommand ("demo_playlist_clear", M_Demo_Playlist_Clear_f);

	FL_Init(&demo_filelist, "./qw");
    FL_AddFileType(&demo_filelist, 0, ".qwd");
	FL_AddFileType(&demo_filelist, 1, ".qwz");
	FL_AddFileType(&demo_filelist, 2, ".mvd");
	FL_AddFileType(&demo_filelist, 3, ".dem");
	#ifdef WITH_VFS_ARCHIVE_LOADING
	FL_AddFileType(&demo_filelist, 4, ".tar");
	FL_AddFileType(&demo_filelist, 4, ".pak");
	#endif // WITH_VFS_ARCHIVE_LOADING
	#ifdef WITH_ZLIB
	FL_AddFileType(&demo_filelist, 4, ".gz");
	#endif // WITH_ZLIB
	#ifdef WITH_ZIP
	FL_AddFileType(&demo_filelist, 4, ".zip");
	FL_AddFileType(&demo_filelist, 4, ".pk3");
	#endif // WITH_ZIP

	Settings_Page_Init(demoplsett, demoplsett_arr);

	// initialize tab control
    CTab_Init(&demo_tab);
	CTab_AddPage(&demo_tab, "Browser", DEMOPG_BROWSER, &demo_browser_handlers);
	CTab_AddPage(&demo_tab, "Playlist", DEMOPG_PLAYLIST, &demo_playlist_handlers);
	CTab_AddPage(&demo_tab, "Entry", DEMOPG_ENTRY, &demo_entry_handlers);
	CTab_AddPage(&demo_tab, "Options", DEMOPG_OPTIONS, &demo_options_handlers);
	CTab_SetCurrentId(&demo_tab, DEMOPG_BROWSER);
}
示例#29
0
文件: qtv.c 项目: jogi1/camquake
void QTV_Init(void)
{
    Cvar_SetCurrentGroup(CVAR_GROUP_MVD); // FIXME: add qtv group instead

    Cvar_Register(&qtv_buffertime);
    Cvar_Register(&qtv_chatprefix);
    Cvar_Register(&qtv_gamechatprefix);
    Cvar_Register(&qtv_skipchained);
    Cvar_Register(&qtv_adjustbuffer);
    Cvar_Register(&qtv_adjustminspeed);
    Cvar_Register(&qtv_adjustmaxspeed);
    Cvar_Register(&qtv_adjustlowstart);
    Cvar_Register(&qtv_adjusthighstart);

    Cvar_Register(&qtv_event_join);
    Cvar_Register(&qtv_event_leave);
    Cvar_Register(&qtv_event_changename);

    Cvar_ResetCurrentGroup();

    Cmd_AddCommand ("qtvusers", Qtvusers_f);
}
示例#30
0
void CL_InitCam(void) 
{
	Cvar_SetCurrentGroup(CVAR_GROUP_SPECTATOR);

	// cl_hightrack 
	Cvar_Register (&cl_hightrack); 

	Cvar_Register (&cl_chasecam);

	Cvar_ResetCurrentGroup();
	Cmd_AddCommand ("track", CL_Track_f);
	Cmd_AddCommand ("autotrack", CL_Autotrack_f);
	Cmd_AddCommand ("trackkiller", CL_Trackkiller_f);

	// Multivew tracking.
	Cmd_AddCommand ("track1", CL_TrackMV1_f);	
	Cmd_AddCommand ("track2", CL_TrackMV2_f);	
	Cmd_AddCommand ("track3", CL_TrackMV3_f);	
	Cmd_AddCommand ("track4", CL_TrackMV4_f);
	Cmd_AddCommand ("trackteam", CL_TrackTeam_f);	
 
 #ifdef JSS_CAM
	Cmd_AddCommand ("cam_pos", Cam_Pos_f);
	Cmd_AddCommand ("cam_angles", Cam_Angles_f);
	Cmd_AddMacro ("cam_pos_x", Macro_Cam_Pos_X);
	Cmd_AddMacro ("cam_pos_y", Macro_Cam_Pos_Y);
	Cmd_AddMacro ("cam_pos_z", Macro_Cam_Pos_Z);
	Cmd_AddMacro ("cam_pos", Macro_Cam_Pos);
 	Cmd_AddMacro ("cam_angles_pitch", Macro_Cam_Angles_Pitch);
 	Cmd_AddMacro ("cam_angles_yaw", Macro_Cam_Angles_Yaw);
 	Cmd_AddMacro ("cam_angles_roll", Macro_Cam_Angles_Roll);
 	Cmd_AddMacro ("cam_angles", Macro_Cam_Angles);
 #endif
 
	// Multiview tracking.	
	memset(mv_trackslots, -1, sizeof(mv_trackslots));
	mv_skinsforced = false;
}