doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RegExp_old.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 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 Doom 3 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 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 Doom 3 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 #ifndef REGEXP_H_
29 #define REGEXP_H_
30 
31 class idWindow;
32 
33 class idRegister {
34 public:
35  idRegister() {};
36  idRegister(const char *p, int t) {
37  name = p;
38  type = t;
39  assert(t >= 0 && t < NUMTYPES);
40  regCount = REGCOUNT[t];
41  enabled = (type == STRING) ? false : true;
42  };
43  bool enabled;
44  int type;
45  int regCount;
46  enum REGTYPE { VEC4 = 0, FLOAT, BOOL, INT, STRING, VEC2, VEC3, NUMTYPES } ;
47  static int REGCOUNT[NUMTYPES];
48  idStr name;
49  int regs[4];
50  void SetToRegs(float *registers, idTypedDict *state);
51  void SetToRegList(idList<float> *registers, idTypedDict *state);
52  void GetFromRegs(float *registers, idTypedDict *state);
54  regs[0] = src->regs[0];
55  regs[1] = src->regs[1];
56  regs[2] = src->regs[2];
57  regs[3] = src->regs[3];
58  }
59  void Enable(bool b) {
60  enabled = b;
61  }
64 
65 };
66 
67 class idRegisterList {
69 public:
70 
71  //
72  void RemoveReg ( const char* name );
73  //
74 
75  void AddReg(const char *name, int type, idParser *src, idWindow *win);
76  void AddReg(const char *name, int type, idVec4 data, idWindow *win);
77  idRegister *FindReg(const char *name);
78  int FindRegIndex ( const char* name );
79  void SetToRegs(float *registers, idTypedDict *state);
80  void GetFromRegs(float *registers, idTypedDict *state);
81  void Reset();
84 
85 };
86 
87 #endif
void CopyRegs(idRegister *src)
Definition: RegExp_old.h:53
void ReadFromDemoFile(idDemoFile *f)
Definition: RegExp.cpp:348
void ReadFromDemoFile(idDemoFile *f)
Definition: RegExp.cpp:162
assert(prefInfo.fullscreenBtn)
unsigned short regs[4]
Definition: RegExp.h:47
idList< idRegister > regs
Definition: RegExp_old.h:68
void GetFromRegs(float *registers)
Definition: RegExp.cpp:299
void GetFromRegs(float *registers)
Definition: RegExp.cpp:105
void Enable(bool b)
Definition: RegExp_old.h:59
idStr name
Definition: RegExp.h:45
GLuint GLuint GLsizei GLenum type
Definition: glext.h:2845
GLuint src
Definition: glext.h:5390
void AddReg(const char *name, int type, idParser *src, idWindow *win, idWinVar *var)
Definition: RegExp.cpp:249
void SetToRegList(idList< float > *registers, idTypedDict *state)
idRegister * FindReg(const char *name)
Definition: RegExp.cpp:323
Definition: Vector.h:808
void WriteToDemoFile(idDemoFile *f)
Definition: RegExp.cpp:365
int FindRegIndex(const char *name)
void SetToRegs(float *registers)
Definition: RegExp.cpp:44
void Reset()
Definition: RegExp.cpp:338
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:2853
GLubyte GLubyte b
Definition: glext.h:4662
void RemoveReg(const char *name)
void SetToRegs(float *registers)
Definition: RegExp.cpp:311
idRegister(const char *p, int t)
Definition: RegExp_old.h:36
tuple f
Definition: idal.py:89
bool enabled
Definition: RegExp.h:43
const GLcharARB * name
Definition: glext.h:3629
static int REGCOUNT[NUMTYPES]
Definition: RegExp.h:41
Definition: Str.h:116
Window win
Definition: glimp.cpp:46
int regCount
Definition: RegExp.h:46
GLfloat GLfloat p
Definition: glext.h:4674
GLdouble GLdouble t
Definition: glext.h:2943
void WriteToDemoFile(idDemoFile *f)
Definition: RegExp.cpp:176