2010-12-25 17:18:13 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace GSDumpGUI
|
|
|
|
|
{
|
|
|
|
|
public class GIFRegXYZ : GIFReg
|
|
|
|
|
{
|
|
|
|
|
public double X;
|
|
|
|
|
public double Y;
|
|
|
|
|
public UInt32 Z;
|
|
|
|
|
public bool ADC;
|
|
|
|
|
|
|
|
|
|
static public GIFReg Unpack(UInt64 LowData, UInt64 HighData, bool PlainFormat)
|
|
|
|
|
{
|
2010-12-25 20:08:25 +00:00
|
|
|
|
GIFRegXYZ xf = new GIFRegXYZ();
|
|
|
|
|
xf.ADC = GIFReg.GetBit(HighData, 47, 1) == 1;
|
2010-12-25 17:18:13 +00:00
|
|
|
|
xf.Descriptor = (xf.ADC == true ? GIFRegDescriptor.XYZ3 : GIFRegDescriptor.XYZ2);
|
2010-12-25 20:08:25 +00:00
|
|
|
|
xf.X = GIFReg.GetBit(LowData, 0, 16) / 16d;
|
|
|
|
|
xf.Y = GIFReg.GetBit(LowData, 32, 16) / 16d;
|
|
|
|
|
xf.Z = (UInt32)(GIFReg.GetBit(HighData, 4, 24));
|
2010-12-25 17:18:13 +00:00
|
|
|
|
return xf;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|