gamma restore fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2169 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-06-09 21:47:43 +00:00
parent dcf0f95e28
commit b7d7e3bf31
3 changed files with 16 additions and 0 deletions
+13
View File
@@ -128,6 +128,19 @@ void setvar(const char *name, int i) { *idents->access(name)->storage.i = i; }
int getvar(const char *name) { return *idents->access(name)->storage.i; }
bool identexists(const char *name) { return idents->access(name)!=NULL; }
void touchvar(const char *name)
{
ident *id = idents->access(name);
if(id) switch(id->type)
{
case ID_VAR:
case ID_FVAR:
case ID_SVAR:
if(id->fun) ((void (__cdecl *)())id->fun)(); // call trigger function if available
break;
}
}
const char *getalias(const char *name)
{
ident *i = idents->access(name);