28 changes: 28 additions & 0 deletions Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp
Expand Up @@ -827,3 +827,31 @@ void Tev::SetRegColor(int reg, int comp, bool konst, s16 color)
Reg[reg][comp] = color;
}
}

void Tev::DoState(PointerWrap &p)
{
p.DoArray(Reg, sizeof(Reg));

p.DoArray(KonstantColors, sizeof(KonstantColors));
p.DoArray(TexColor,4);
p.DoArray(RasColor,4);
p.DoArray(StageKonst,4);
p.DoArray(Zero16,4);

p.DoArray(FixedConstants,9);
p.Do(AlphaBump);
p.DoArray(IndirectTex, sizeof(IndirectTex));
p.Do(TexCoord);

p.DoArray(m_BiasLUT,4);
p.DoArray(m_ScaleLShiftLUT,4);
p.DoArray(m_ScaleRShiftLUT,4);

p.DoArray(Position,3);
p.DoArray(Color, sizeof(Color));
p.DoArray(Uv, 8);
p.DoArray(IndirectLod,4);
p.DoArray(IndirectLinear,4);
p.DoArray(TextureLod,16);
p.DoArray(TextureLinear,16);
}
3 changes: 3 additions & 0 deletions Source/Plugins/Plugin_VideoSoftware/Src/Tev.h
Expand Up @@ -19,6 +19,7 @@
#define _TEV_H_

#include "BPMemLoader.h"
#include "ChunkFile.h"

class Tev
{
Expand Down Expand Up @@ -96,6 +97,8 @@ class Tev
void SetRegColor(int reg, int comp, bool konst, s16 color);

enum { ALP_C, BLU_C, GRN_C, RED_C };

void DoState(PointerWrap &p);
};

#endif
7 changes: 7 additions & 0 deletions Source/Plugins/Plugin_VideoSoftware/Src/Vec3.h
Expand Up @@ -20,6 +20,7 @@

#include <stdlib.h>
#include <math.h>
#include "ChunkFile.h"

class Vec3
{
Expand Down Expand Up @@ -111,6 +112,12 @@ class Vec3
{
memset((void *)this,0,sizeof(float)*3);
}
void DoState(PointerWrap &p)
{
p.Do(x);
p.Do(y);
p.Do(z);
}
};

#endif