/[pcsx2_0.9.7]/trunk/tools/GSDumpGUI/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegUV.cs
ViewVC logotype

Contents of /trunk/tools/GSDumpGUI/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegUV.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 313 - (show annotations) (download)
Sun Dec 26 16:21:07 2010 UTC (9 years, 9 months ago) by william
File size: 1130 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4151 local: v0.9.7.293-latest) in ./trunk
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4
5 namespace GSDumpGUI
6 {
7 public class GIFRegUV : GIFReg
8 {
9 public double U;
10 public double V;
11
12 public GIFRegUV(int addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
13
14 static public GIFReg Unpack(GIFTag tag, int addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
15 {
16 GIFRegUV uv = new GIFRegUV(addr, LowData, HighData, PackedFormat);
17 uv.Descriptor = (GIFRegDescriptor)addr;
18 if (PackedFormat)
19 {
20 uv.U = GetBit(LowData, 0, 14) / 16d;
21 uv.V = GetBit(LowData, 32, 14) / 16d;
22 }
23 else
24 {
25 uv.U = GetBit(LowData, 0, 14) / 16d;
26 uv.V = GetBit(LowData, 16, 14) / 16d;
27 }
28 return uv;
29 }
30
31 public override string ToString()
32 {
33 return Descriptor.ToString() + "@U : " + U.ToString("F4") + "@V : " + V.ToString("F4");
34 }
35 }
36 }

  ViewVC Help
Powered by ViewVC 1.1.22