public static GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) { GIFRegPRIM pr = new GIFRegPRIM(addr, LowData, HighData, PackedFormat); pr.Descriptor = (GIFRegDescriptor)addr; pr.PrimitiveType = (GS_PRIM)GetBit(LowData, 0, 3); pr.IIP = (GSIIP)GetBit(LowData, 3, 1); pr.TME = Convert.ToBoolean(GetBit(LowData, 4, 1)); pr.FGE = Convert.ToBoolean(GetBit(LowData, 5, 1)); pr.ABE = Convert.ToBoolean(GetBit(LowData, 6, 1)); pr.AA1 = Convert.ToBoolean(GetBit(LowData, 7, 1)); pr.FST = (GSFST)(GetBit(LowData, 8, 1)); pr.CTXT = (GSCTXT)(GetBit(LowData, 9, 1)); pr.FIX = (GSFIX)(GetBit(LowData, 10, 1)); return pr; }
static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) { GIFRegPRIM pr = new GIFRegPRIM(addr, LowData, HighData, PackedFormat); pr.Descriptor = (GIFRegDescriptor)addr; pr.PrimitiveType = (GS_PRIM)GetBit(LowData, 0, 3); pr.IIP = (GSIIP)GetBit(LowData, 3, 1); pr.TME = Convert.ToBoolean(GetBit(LowData, 4, 1)); pr.FGE = Convert.ToBoolean(GetBit(LowData, 5, 1)); pr.ABE = Convert.ToBoolean(GetBit(LowData, 6, 1)); pr.AA1 = Convert.ToBoolean(GetBit(LowData, 7, 1)); pr.FST = (GSFST)(GetBit(LowData, 8, 1)); pr.CTXT = (GSCTXT)(GetBit(LowData, 9, 1)); pr.FIX = (GSFIX)(GetBit(LowData, 10, 1)); return(pr); }