idCommandLink::idCommandLink( const char* cmdName, cmdFunction_t function, const char* description, argCompletion_t argCompletion ) { next = CommandLinks(); CommandLinks( this ); cmdName_ = cmdName; function_ = function; description_ = description; argCompletion_ = argCompletion; }
/* ============ idCmdSystemLocal::Init ============ */ void idCmdSystemLocal::Init() { AddCommand( "listCmds", List_f, CMD_FL_SYSTEM, "lists commands" ); AddCommand( "listSystemCmds", SystemList_f, CMD_FL_SYSTEM, "lists system commands" ); AddCommand( "listRendererCmds", RendererList_f, CMD_FL_SYSTEM, "lists renderer commands" ); AddCommand( "listSoundCmds", SoundList_f, CMD_FL_SYSTEM, "lists sound commands" ); AddCommand( "listGameCmds", GameList_f, CMD_FL_SYSTEM, "lists game commands" ); AddCommand( "listToolCmds", ToolList_f, CMD_FL_SYSTEM, "lists tool commands" ); AddCommand( "exec", Exec_f, CMD_FL_SYSTEM, "executes a config file", ArgCompletion_ConfigName ); AddCommand( "vstr", Vstr_f, CMD_FL_SYSTEM, "inserts the current value of a cvar as command text" ); AddCommand( "echo", Echo_f, CMD_FL_SYSTEM, "prints text" ); AddCommand( "parse", Parse_f, CMD_FL_SYSTEM, "prints tokenized string" ); AddCommand( "wait", Wait_f, CMD_FL_SYSTEM, "delays remaining buffered commands one or more frames" ); // link in all the commands declared with static idCommandLink variables or CONSOLE_COMMAND macros for( idCommandLink* link = CommandLinks(); link != NULL; link = link->next ) { AddCommand( link->cmdName_, link->function_, CMD_FL_SYSTEM, link->description_, link->argCompletion_ ); } completionString = "*"; textLength = 0; }