2010-12-25 17:18:13 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace GSDumpGUI
|
|
|
|
|
{
|
2010-12-29 08:41:15 +00:00
|
|
|
|
[Serializable]
|
2010-12-25 17:18:13 +00:00
|
|
|
|
public class GIFRegUV : GIFReg
|
|
|
|
|
{
|
|
|
|
|
public double U;
|
|
|
|
|
public double V;
|
|
|
|
|
|
2010-12-28 18:31:45 +00:00
|
|
|
|
public GIFRegUV(byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
|
2010-12-26 12:22:37 +00:00
|
|
|
|
|
2010-12-28 18:31:45 +00:00
|
|
|
|
static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
|
2010-12-25 17:18:13 +00:00
|
|
|
|
{
|
2010-12-26 12:22:37 +00:00
|
|
|
|
GIFRegUV uv = new GIFRegUV(addr, LowData, HighData, PackedFormat);
|
2010-12-26 01:00:11 +00:00
|
|
|
|
uv.Descriptor = (GIFRegDescriptor)addr;
|
|
|
|
|
if (PackedFormat)
|
|
|
|
|
{
|
|
|
|
|
uv.U = GetBit(LowData, 0, 14) / 16d;
|
|
|
|
|
uv.V = GetBit(LowData, 32, 14) / 16d;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
uv.U = GetBit(LowData, 0, 14) / 16d;
|
|
|
|
|
uv.V = GetBit(LowData, 16, 14) / 16d;
|
|
|
|
|
}
|
|
|
|
|
return uv;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return Descriptor.ToString() + "@U : " + U.ToString("F4") + "@V : " + V.ToString("F4");
|
2010-12-25 17:18:13 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|