| | |
| | | class tagDBCrossBillboard(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ('GroupValue1', ctypes.c_ubyte),
|
| | | ('GroupValue2', ctypes.c_ubyte),
|
| | | ('GroupValue1', ctypes.c_ulong),
|
| | | ('GroupValue2', ctypes.c_ulong),
|
| | | ('BillboardType', ctypes.c_ubyte),
|
| | | ('ID', ctypes.c_ulong),
|
| | | ('ID2', ctypes.c_ulong),
|
| | |
| | | if len(buf) < pos + self.getLength():
|
| | | return -1
|
| | | self.clear()
|
| | | self.GroupValue1, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.GroupValue2, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.GroupValue1, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.GroupValue2, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.BillboardType, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.ID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.ID2, pos = CommFunc.ReadDWORD(buf, pos)
|
| | |
| | |
|
| | | def getBuffer(self):
|
| | | buf = ''
|
| | | buf = CommFunc.WriteBYTE(buf, self.GroupValue1)
|
| | | buf = CommFunc.WriteBYTE(buf, self.GroupValue2)
|
| | | buf = CommFunc.WriteDWORD(buf, self.GroupValue1)
|
| | | buf = CommFunc.WriteDWORD(buf, self.GroupValue2)
|
| | | buf = CommFunc.WriteBYTE(buf, self.BillboardType)
|
| | | buf = CommFunc.WriteDWORD(buf, self.ID)
|
| | | buf = CommFunc.WriteDWORD(buf, self.ID2)
|
| | |
| | |
|
| | | def getLength(self):
|
| | | length = 0
|
| | | length += sizeof(ctypes.c_ubyte)
|
| | | length += sizeof(ctypes.c_ubyte)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ubyte)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|