#include <tile_lumel.h>
Definition at line 52 of file tile_lumel.h.
Public Member Functions | |
| uint8 | popBack4bits () |
| Pop 4 bits. | |
| bool | popBackBool () |
| Pop a bool. | |
| void | pushBack4bits (uint8 fourBits) |
| Push 4 bits. | |
| void | pushBackBool (bool bBoolean) |
| Push a bool. | |
| void | setPtr (std::vector< uint8 > *buffer) |
| Init the pointer of the stream. | |
Private Attributes | |
| uint | _Offset |
| std::vector< uint8 > * | _Vector |
|
|
Pop 4 bits.
Definition at line 186 of file tile_lumel.h. References popBackBool(), and uint8. Referenced by NL3D::CTileLumel::skip(), and NL3D::CTileLumel::unpack().
00187 {
00188 uint8 ret;
00189 ret=(uint8)popBackBool ()<<3;
00190 ret|=(uint8)popBackBool ()<<2;
00191 ret|=(uint8)popBackBool ()<<1;
00192 ret|=(uint8)popBackBool ();
00193 return ret;
00194 /*nlassert (((_Offset+3)>>3)<_Vector->size());
00195
00196 uint off0=_Offset>>3;
00197 uint off1=off0+1;
00198 _Offset+=4;
00199 return (((*_Vector)[off0]&(0xf<<( _Offset&0x7 )))>>(_Offset&0x7))|
00200 (((*_Vector)[off1]&(0xf>>(8-(_Offset&0x7))))<<(8-(_Offset&0x7)));*/
00201 }
|
|
|
Pop a bool.
Definition at line 174 of file tile_lumel.h. References _Offset, _Vector, nlassert, and uint. Referenced by popBack4bits(), NL3D::CTileLumel::skip(), and NL3D::CTileLumel::unpack().
|
|
|
Push 4 bits.
Definition at line 152 of file tile_lumel.h. References nlassert, pushBackBool(), and uint8. Referenced by NL3D::CTileLumel::pack().
00153 {
00154 nlassert (fourBits<0x10);
00155
00156 pushBackBool ((fourBits&0x8)!=0);
00157 pushBackBool ((fourBits&0x4)!=0);
00158 pushBackBool ((fourBits&0x2)!=0);
00159 pushBackBool ((fourBits&0x1)!=0);
00160
00161 /*if (((_Offset+3)>>3)+_Vector->begin()>=_Vector->end())
00162 _Vector->resize (((_Offset+3)>>3)+1);
00163
00164 uint off0=_Offset>>3;
00165 uint off1=off0+1;
00166 (*_Vector)[off0]&=~(0xf<<(_Offset&0x7));
00167 (*_Vector)[off0]|=(((uint)fourBits)<<(_Offset&0x7));
00168 (*_Vector)[off1]&=~(0xf>>(8-(_Offset&0x7)));
00169 (*_Vector)[off1]|=(((uint)fourBits)>>(8-(_Offset&0x7)));
00170 _Offset+=4;*/
00171 }
|
|
|
Push a bool.
Definition at line 139 of file tile_lumel.h. References _Offset, _Vector, and uint. Referenced by NL3D::CTileLumel::pack(), and pushBack4bits().
|
|
|
Init the pointer of the stream.
Definition at line 132 of file tile_lumel.h. References _Offset, _Vector, and buffer.
|
|
|
Definition at line 71 of file tile_lumel.h. Referenced by popBackBool(), pushBackBool(), and setPtr(). |
|
|
Definition at line 70 of file tile_lumel.h. Referenced by popBackBool(), pushBackBool(), and setPtr(). |
1.3.6