29 #include "../idlib/precompiled.h"
96 registers[
regs[
i ] ] = v[
i];
114 v[
i] = registers[
regs[
i]];
166 for (
int i = 0;
i < 4;
i++ )
180 for (
int i = 0;
i < 4;
i++)
199 savefile->
Write( &len,
sizeof( len ) );
218 savefile->
Read( &len,
sizeof( len ) );
219 name.Fill(
' ', len );
236 for (
int i = 0;
i < numRegs;
i++ ) {
263 var->
Init( tok, win );
266 for (
int i = 0;
i < numRegs;
i++ ) {
268 if (
i < numRegs-1 ) {
281 var->
Init( tok, win );
284 for (
int i = 0;
i < numRegs;
i++ ) {
286 if (
i < numRegs-1 ) {
301 regs[
i]->GetFromRegs( registers );
313 for ( i = 0; i <
regs.
Num(); i++ ) {
314 regs[
i]->SetToRegs( registers );
326 if (
regs[
i]->name.Icmp( name ) == 0 ) {
353 for (
int i = 0;
i <
c;
i++ ) {
369 for (
int i = 0 ;
i <
c;
i++ ) {
370 regs[
i]->WriteToDemoFile(f);
383 savefile->
Write( &num,
sizeof( num ) );
385 for ( i = 0; i <
num; i++ ) {
386 regs[
i]->WriteToSaveGame( savefile );
398 savefile->
Read( &num,
sizeof( num ) );
399 for ( i = 0; i <
num; i++ ) {
400 regs[
i]->ReadFromSaveGame( savefile );
virtual void WriteToSaveGame(idFile *savefile)=0
virtual int ReadShort(short &value)
void ReadFromDemoFile(idDemoFile *f)
void ReadFromDemoFile(idDemoFile *f)
virtual int virtual int ReadInt(int &value)
assert(prefInfo.fullscreenBtn)
int ExpressionConstant(float f)
int Next(const int index) const
virtual void virtual void virtual const idLangDict * GetLanguageDict(void)=0
void GetFromRegs(float *registers)
void GetFromRegs(float *registers)
void WriteToSaveGame(idFile *savefile)
GLuint GLuint GLsizei GLenum type
int ExpectTokenString(const char *string)
void AddReg(const char *name, int type, idParser *src, idWindow *win, idWinVar *var)
int First(const int key) const
idList< idRegister * > regs
void ReadFromSaveGame(idFile *savefile)
int ReadToken(idToken *token)
GLfloat GLfloat GLfloat v2
virtual int ReadUnsignedShort(unsigned short &value)
virtual int WriteInt(const int value)
const idVec4 & ToVec4() const
idRegister * FindReg(const char *name)
void WriteToDemoFile(idDemoFile *f)
void SetToRegs(float *registers)
virtual void Init(const char *_name, idWindow *win)=0
GLsizei GLsizei GLenum GLenum const GLvoid * data
virtual void virtual void FatalError(const char *fmt,...) id_attribute((format(printf
virtual void ReadFromSaveGame(idFile *savefile)=0
virtual int Read(void *buffer, int len)
const char * GetString(const char *str) const
void ReadFromSaveGame(idFile *savefile)
void DeleteContents(bool clear)
virtual int ReadBool(bool &value)
int GenerateKey(const char *string, bool caseSensitive=true) const
void WriteToSaveGame(idFile *savefile)
void SetToRegs(float *registers)
int ParseExpression(idParser *src, idWinVar *var=NULL, int component=0)
GLfloat GLfloat GLfloat GLfloat v3
int Append(const type &obj)
virtual int WriteShort(const short value)
virtual int Write(const void *buffer, int len)
static int REGCOUNT[NUMTYPES]
const idVec3 & ToVec3(void) const
const char * ReadHashString()
void Add(const int key, const int index)
const idVec2 & ToVec2(void) const
virtual int WriteBool(const bool value)
virtual int WriteUnsignedShort(unsigned short value)
void WriteHashString(const char *str)
void WriteToDemoFile(idDemoFile *f)