public static GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) { GIFRegST st = new GIFRegST(addr, LowData, HighData, PackedFormat); st.Descriptor = (GIFRegDescriptor)addr; st.S = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 0); st.T = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 4); if (PackedFormat) { st.Q = BitConverter.ToSingle(BitConverter.GetBytes(HighData), 0); tag.Q = st.Q; st.isSTQ = true; } else st.isSTQ = false; return st; }
static public GIFReg Unpack(GIFTag tag, byte addr, UInt64 LowData, UInt64 HighData, bool PackedFormat) { GIFRegST st = new GIFRegST(addr, LowData, HighData, PackedFormat); st.Descriptor = (GIFRegDescriptor)addr; st.S = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 0); st.T = BitConverter.ToSingle(BitConverter.GetBytes(LowData), 4); if (PackedFormat) { st.Q = BitConverter.ToSingle(BitConverter.GetBytes(HighData), 0); tag.Q = st.Q; st.isSTQ = true; } else { st.isSTQ = false; } return(st); }