diff options
author | Eugene Sandulenko | 2004-07-31 23:33:14 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-07-31 23:33:14 +0000 |
commit | 46a1c45d70bbfb6654a9c13e26949a4543d17e80 (patch) | |
tree | 69cc31d24d4fce500a388ce2ba992a4c51365ce7 /saga/cvar.cpp | |
parent | f0d6fd8c5ac3bf144eef93f146e9c056321e11db (diff) | |
download | scummvm-rg350-46a1c45d70bbfb6654a9c13e26949a4543d17e80.tar.gz scummvm-rg350-46a1c45d70bbfb6654a9c13e26949a4543d17e80.tar.bz2 scummvm-rg350-46a1c45d70bbfb6654a9c13e26949a4543d17e80.zip |
Extended CVAR_RegisterFunc with callback object parameter.
Got rid of static structure in animation.cpp
svn-id: r14397
Diffstat (limited to 'saga/cvar.cpp')
-rw-r--r-- | saga/cvar.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/saga/cvar.cpp b/saga/cvar.cpp index 84fd9888ff..fe531f9162 100644 --- a/saga/cvar.cpp +++ b/saga/cvar.cpp @@ -160,7 +160,7 @@ int CVAR_Exec(R_CVAR_P cvar_func, char *r_value) { } // Call function - (cvar_func->t.func.func_p) (cf_argc, cf_argv); + (cvar_func->t.func.func_p) (cf_argc, cf_argv, cvar_func->refCon); if (cf_argv) free(cf_argv); @@ -334,13 +334,14 @@ int CVAR_IsFunc(R_CVAR_P cvar_func) { // Registers a console function 'cvar' // (could think of a better place to put these...?) int CVAR_RegisterFunc(cv_func_t func, const char *func_name, - const char *func_argstr, uint16 flags, int min_args, int max_args) { + const char *func_argstr, uint16 flags, int min_args, int max_args, void *refCon) { R_CVAR new_cvar; int hash; new_cvar.name = func_name; new_cvar.type = R_CVAR_FUNC; new_cvar.section = NULL; + new_cvar.refCon = refCon; new_cvar.flags = flags; new_cvar.t.func.func_p = func; new_cvar.t.func.func_argstr = func_argstr; |