00001 /* 00002 =========================================================================== 00003 Copyright (C) 1999-2005 Id Software, Inc. 00004 00005 This file is part of Quake III Arena source code. 00006 00007 Quake III Arena source code is free software; you can redistribute it 00008 and/or modify it under the terms of the GNU General Public License as 00009 published by the Free Software Foundation; either version 2 of the License, 00010 or (at your option) any later version. 00011 00012 Quake III Arena source code is distributed in the hope that it will be 00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Foobar; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 =========================================================================== 00021 */ 00022 00023 /***************************************************************************** 00024 * name: l_libvar.h 00025 * 00026 * desc: botlib vars 00027 * 00028 * $Archive: /source/code/botlib/l_libvar.h $ 00029 * 00030 *****************************************************************************/ 00031 00032 //library variable 00033 typedef struct libvar_s 00034 { 00035 char *name; 00036 char *string; 00037 int flags; 00038 qboolean modified; // set each time the cvar is changed 00039 float value; 00040 struct libvar_s *next; 00041 } libvar_t; 00042 00043 //removes all library variables 00044 void LibVarDeAllocAll(void); 00045 //gets the library variable with the given name 00046 libvar_t *LibVarGet(char *var_name); 00047 //gets the string of the library variable with the given name 00048 char *LibVarGetString(char *var_name); 00049 //gets the value of the library variable with the given name 00050 float LibVarGetValue(char *var_name); 00051 //creates the library variable if not existing already and returns it 00052 libvar_t *LibVar(char *var_name, char *value); 00053 //creates the library variable if not existing already and returns the value 00054 float LibVarValue(char *var_name, char *value); 00055 //creates the library variable if not existing already and returns the value string 00056 char *LibVarString(char *var_name, char *value); 00057 //sets the library variable 00058 void LibVarSet(char *var_name, char *value); 00059 //returns true if the library variable has been modified 00060 qboolean LibVarChanged(char *var_name); 00061 //sets the library variable to unmodified 00062 void LibVarSetNotModified(char *var_name); 00063
1.3.9.1