1 /* 2 =========================================================================== 3 4 Return to Castle Wolfenstein single player GPL Source Code 5 Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. 6 7 This file is part of the Return to Castle Wolfenstein single player GPL Source Code (RTCW SP Source Code). 8 9 RTCW SP Source Code is free software: you can redistribute it and/or modify 10 it under the terms of the GNU General Public License as published by 11 the Free Software Foundation, either version 3 of the License, or 12 (at your option) any later version. 13 14 RTCW SP Source Code is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with RTCW SP Source Code. If not, see <http://www.gnu.org/licenses/>. 21 22 In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below. 23 24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. 25 26 =========================================================================== 27 */ 28 29 30 /***************************************************************************** 31 * name: l_libvar.h 32 * 33 * desc: botlib vars 34 * 35 * 36 *****************************************************************************/ 37 38 //library variable 39 typedef struct libvar_s 40 { 41 char *name; 42 char *string; 43 int flags; 44 qboolean modified; // set each time the cvar is changed 45 float value; 46 struct libvar_s *next; 47 } libvar_t; 48 49 //removes all library variables 50 void LibVarDeAllocAll( void ); 51 //gets the library variable with the given name 52 libvar_t *LibVarGet( const char *var_name ); 53 //gets the string of the library variable with the given name 54 char *LibVarGetString( const char *var_name ); 55 //gets the value of the library variable with the given name 56 float LibVarGetValue( const char *var_name ); 57 //creates the library variable if not existing already and returns it 58 libvar_t *LibVar( const char *var_name, const char *value ); 59 //creates the library variable if not existing already and returns the value 60 float LibVarValue( const char *var_name, const char *value ); 61 //creates the library variable if not existing already and returns the value string 62 char *LibVarString( const char *var_name, const char *value ); 63 //sets the library variable 64 void LibVarSet( const char *var_name, const char *value ); 65 //returns true if the library variable has been modified 66 qboolean LibVarChanged( const char *var_name ); 67 //sets the library variable to unmodified 68 void LibVarSetNotModified( const char *var_name ); 69 70