| 42 | } |
| 43 | |
| 44 | bool CBitStream_Compressed::ReadBitStream( CStream &stm, uint32 &Value, const eBitStreamHint eHint ) |
| 45 | { |
| 46 | switch(eHint) |
| 47 | { |
| 48 | case eEntityId: |
| 49 | { |
| 50 | int16 Val; |
| 51 | if(!stm.ReadPkd(Val)) // compressed as signed number because negative EntityId are dynamic |
| 52 | return false; |
| 53 | |
| 54 | uint16 wVal=(uint16)Val; |
| 55 | |
| 56 | Value=(uint32)wVal; |
| 57 | } |
| 58 | return true; |
| 59 | |
| 60 | case eEntityClassId: |
| 61 | { |
| 62 | uint16 Val; |
| 63 | if(!stm.ReadPkd(Val)) |
| 64 | return false; |
| 65 | |
| 66 | Value=(int32)Val; |
| 67 | } |
| 68 | return true; |
| 69 | } |
| 70 | |
| 71 | return stm.Read((unsigned int&)Value); |
| 72 | } |
| 73 | |
| 74 | bool CBitStream_Compressed::WriteBitStream( CStream &stm, const int32 Value, const eBitStreamHint eHint ) |
| 75 | { |
nothing calls this directly
no test coverage detected