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

Contents of /trunk/tools/GSDumpGUI/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegST.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: 1322 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 GIFRegST : GIFReg
8 {
9 public float S;
10 public float T;
11 public float Q;
12
13 public bool isSTQ;
14
15 public GIFRegST(int addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
16
17 static public GIFReg Unpack(GIFTag tag, int addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
18 {
19 GIFRegST st = new GIFRegST(addr, LowData, HighData, PackedFormat);
20 st.Descriptor = (GIFRegDescriptor)addr;
21
22 st.S = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 0);
23 st.T = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 4);
24 if (PackedFormat)
25 {
26 st.Q = BitConverter.ToSingle(BitConverter.GetBytes(HighData), 0);
27 tag.Q = st.Q;
28 st.isSTQ = true;
29 }
30 else
31 st.isSTQ = false;
32
33 return st;
34 }
35
36 public override string ToString()
37 {
38 return Descriptor.ToString() + "@S : " + S.ToString("F8") + "@T : " + T.ToString("F8") + (isSTQ ? "@Q : " + Q.ToString("F8") : "");
39 }
40 }
41 }

  ViewVC Help
Powered by ViewVC 1.1.22