mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add 'bf_write::WriteBytes'
This commit is contained in:
parent
83d5deb109
commit
e51336dd5a
@ -188,6 +188,8 @@ public:
|
||||
// Write a list of bits in.
|
||||
bool WriteBits(const void* pIn, int nBits);
|
||||
|
||||
bool WriteBytes(const void* pIn, int nBytes);
|
||||
|
||||
// How many bytes are filled in?
|
||||
int GetNumBytesWritten() const;
|
||||
int GetNumBitsWritten() const;
|
||||
|
@ -651,6 +651,14 @@ bool bf_write::WriteBits(const void* pInData, int nBits)
|
||||
return !IsOverflowed();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: writes a list of bytes to the buffer
|
||||
//-----------------------------------------------------------------------------
|
||||
bool bf_write::WriteBytes(const void* pBuf, int nBytes)
|
||||
{
|
||||
return WriteBits(pBuf, nBytes << 3);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: writes a bit into the buffer
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user