MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / ReadBitStream

Method ReadBitStream

CryGame/BitStream_Compressed.cpp:44–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44bool 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
74bool CBitStream_Compressed::WriteBitStream( CStream &stm, const int32 Value, const eBitStreamHint eHint )
75{

Callers

nothing calls this directly

Calls 3

ReadPkdMethod · 0.80
ReadMethod · 0.45
ReadNumberInBitsMethod · 0.45

Tested by

no test coverage detected