src/console.cpp
changeset 6416 dc8d134b8c48
parent 6247 7d81e3a5d803
child 6422 6679df1c05ba
equal deleted inserted replaced
6415:cb61e1346600 6416:dc8d134b8c48
   426 }
   426 }
   427 
   427 
   428 /**
   428 /**
   429  * It is possible to print debugging information to the console,
   429  * It is possible to print debugging information to the console,
   430  * which is achieved by using this function. Can only be used by
   430  * which is achieved by using this function. Can only be used by
   431  * @debug() in debug.c. You need at least a level 2 (developer) for debugging
   431  * debug() in debug.cpp. You need at least a level 2 (developer) for debugging
   432  * messages to show up
   432  * messages to show up
   433  * @param dbg debugging category
   433  * @param dbg debugging category
   434  * @param string debugging message
   434  * @param string debugging message
   435  */
   435  */
   436 void IConsoleDebug(const char *dbg, const char *string)
   436 void IConsoleDebug(const char *dbg, const char *string)
   487     * hooking code            *
   487     * hooking code            *
   488     * *************************/
   488     * *************************/
   489 
   489 
   490 /**
   490 /**
   491  * General internal hooking code that is the same for both commands and variables
   491  * General internal hooking code that is the same for both commands and variables
   492  * @param hooks @IConsoleHooks structure that will be set according to
   492  * @param hooks IConsoleHooks structure that will be set according to
   493  * @param type type access trigger
   493  * @param type type access trigger
   494  * @param proc function called when the hook criteria is met
   494  * @param proc function called when the hook criteria is met
   495  */
   495  */
   496 static void IConsoleHookAdd(IConsoleHooks *hooks, IConsoleHookTypes type, IConsoleHook *proc)
   496 static void IConsoleHookAdd(IConsoleHooks *hooks, IConsoleHookTypes type, IConsoleHook *proc)
   497 {
   497 {
   512 }
   512 }
   513 
   513 
   514 /**
   514 /**
   515  * Handle any special hook triggers. If the hook type is met check if
   515  * Handle any special hook triggers. If the hook type is met check if
   516  * there is a function associated with that and if so, execute it
   516  * there is a function associated with that and if so, execute it
   517  * @param hooks @IConsoleHooks structure that will be checked
   517  * @param hooks IConsoleHooks structure that will be checked
   518  * @param type type of hook, trigger that needs to be activated
   518  * @param type type of hook, trigger that needs to be activated
   519  * @return true on a successfull execution of the hook command or if there
   519  * @return true on a successfull execution of the hook command or if there
   520  * is no hook/trigger present at all. False otherwise
   520  * is no hook/trigger present at all. False otherwise
   521  */
   521  */
   522 static bool IConsoleHookHandle(const IConsoleHooks *hooks, IConsoleHookTypes type)
   522 static bool IConsoleHookHandle(const IConsoleHooks *hooks, IConsoleHookTypes type)
   765 }
   765 }
   766 
   766 
   767 /**
   767 /**
   768  * Special function for adding string-type variables. They in addition
   768  * Special function for adding string-type variables. They in addition
   769  * also need a 'size' value saying how long their string buffer is.
   769  * also need a 'size' value saying how long their string buffer is.
       
   770  * @param name name of the variable that will be used
       
   771  * @param addr memory location the variable will point to
   770  * @param size the length of the string buffer
   772  * @param size the length of the string buffer
   771  * For more information see @IConsoleVarRegister()
   773  * @param help the help string shown for the variable
       
   774  * For more information see IConsoleVarRegister()
   772  */
   775  */
   773 void IConsoleVarStringRegister(const char *name, void *addr, uint32 size, const char *help)
   776 void IConsoleVarStringRegister(const char *name, void *addr, uint32 size, const char *help)
   774 {
   777 {
   775 	IConsoleVar *var;
   778 	IConsoleVar *var;
   776 	IConsoleVarRegister(name, addr, ICONSOLE_VAR_STRING, help);
   779 	IConsoleVarRegister(name, addr, ICONSOLE_VAR_STRING, help);