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

Contents of /trunk/tools/GSDumpGUI/Library/GSDump/GSData/GIFPacket/GIFReg/GIFRegPrim.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: 2115 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 GIFRegPRIM : GIFReg
8 {
9 public GS_PRIM PrimitiveType;
10 public GSIIP IIP;
11 public bool TME;
12 public bool FGE;
13 public bool ABE;
14 public bool AA1;
15 public GSFST FST;
16 public GSCTXT CTXT;
17 public GSFIX FIX;
18
19 public GIFRegPRIM(int addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) : base(addr, LowData, HighData, PackedFormat) { }
20
21 static public GIFReg Unpack(GIFTag tag, int addr, UInt64 LowData, UInt64 HighData, bool PackedFormat)
22 {
23 GIFRegPRIM pr = new GIFRegPRIM(addr, LowData, HighData, PackedFormat);
24 pr.Descriptor = (GIFRegDescriptor)addr;
25 pr.PrimitiveType = (GS_PRIM)GetBit(LowData, 0, 3);
26 pr.IIP = (GSIIP)GetBit(LowData, 3, 1);
27 pr.TME = Convert.ToBoolean(GetBit(LowData, 4, 1));
28 pr.FGE = Convert.ToBoolean(GetBit(LowData, 5, 1));
29 pr.ABE = Convert.ToBoolean(GetBit(LowData, 6, 1));
30 pr.AA1 = Convert.ToBoolean(GetBit(LowData, 7, 1));
31 pr.FST = (GSFST)(GetBit(LowData, 8, 1));
32 pr.CTXT = (GSCTXT)(GetBit(LowData, 9, 1));
33 pr.FIX = (GSFIX)(GetBit(LowData, 10, 1));
34 return pr;
35 }
36
37 public override string ToString()
38 {
39 return Descriptor.ToString() + "@Primitive Type : " + PrimitiveType.ToString() + "@IIP : " + IIP.ToString() + "@TME : " + TME.ToString() + "@FGE : " + FGE.ToString()
40 + "@ABE : " + ABE.ToString() + "@AA1 : " + AA1.ToString() + "@FST : " + FST.ToString() + "@CTXT : " + CTXT.ToString() + "@FIX : " + FIX.ToString();
41 }
42 }
43
44 public enum GSIIP
45 {
46 FlatShading=0,
47 Gouraud=1
48 }
49
50 public enum GSFST
51 {
52 STQValue=0,
53 UVValue=1
54 }
55
56 public enum GSCTXT
57 {
58 Context1 =0,
59 Context2 =1
60 }
61
62 public enum GSFIX
63 {
64 Unfixed =0,
65 Fixed = 1
66 }
67 }

  ViewVC Help
Powered by ViewVC 1.1.22