Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

l_libvar.h (2386B)


      1 /*
      2 ===========================================================================
      3 Copyright (C) 1999-2005 Id Software, Inc.
      4 
      5 This file is part of Quake III Arena source code.
      6 
      7 Quake III Arena source code is free software; you can redistribute it
      8 and/or modify it under the terms of the GNU General Public License as
      9 published by the Free Software Foundation; either version 2 of the License,
     10 or (at your option) any later version.
     11 
     12 Quake III Arena source code is distributed in the hope that it will be
     13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 GNU General Public License for more details.
     16 
     17 You should have received a copy of the GNU General Public License
     18 along with Foobar; if not, write to the Free Software
     19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     20 ===========================================================================
     21 */
     22 
     23 /*****************************************************************************
     24  * name:		l_libvar.h
     25  *
     26  * desc:		botlib vars
     27  *
     28  * $Archive: /source/code/botlib/l_libvar.h $
     29  *
     30  *****************************************************************************/
     31 
     32 //library variable
     33 typedef struct libvar_s
     34 {
     35 	char		*name;
     36 	char		*string;
     37 	int		flags;
     38 	qboolean	modified;	// set each time the cvar is changed
     39 	float		value;
     40 	struct	libvar_s *next;
     41 } libvar_t;
     42 
     43 //removes all library variables
     44 void LibVarDeAllocAll(void);
     45 //gets the library variable with the given name
     46 libvar_t *LibVarGet(char *var_name);
     47 //gets the string of the library variable with the given name
     48 char *LibVarGetString(char *var_name);
     49 //gets the value of the library variable with the given name
     50 float LibVarGetValue(char *var_name);
     51 //creates the library variable if not existing already and returns it
     52 libvar_t *LibVar(char *var_name, char *value);
     53 //creates the library variable if not existing already and returns the value
     54 float LibVarValue(char *var_name, char *value);
     55 //creates the library variable if not existing already and returns the value string
     56 char *LibVarString(char *var_name, char *value);
     57 //sets the library variable
     58 void LibVarSet(char *var_name, char *value);
     59 //returns true if the library variable has been modified
     60 qboolean LibVarChanged(char *var_name);
     61 //sets the library variable to unmodified
     62 void LibVarSetNotModified(char *var_name);
     63