MCPcopy Create free account
hub / github.com/Segs/Segs / unpackColor

Method unpackColor

Projects/CoX/Common/GameData/GameDataStore.cpp:179–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177 }
178
179 void unpackColor(BitStream &bs, uint32_t &tgt)const override
180 {
181 bool in_hash= bs.GetBits(1);
182 if(in_hash)
183 {
184 uint16_t hash_idx = bs.GetBits(colorcachecount_bitlength);
185 const uint32_t *kv = m_colors.key_for_idx(hash_idx);
186 tgt = kv!=nullptr ? *kv : 0;
187 return;
188 }
189 tgt = bs.GetBits(32);
190 }
191
192 void packPartname(const QString &str, BitStream &bs) const override
193 {

Callers 1

serializefromFunction · 0.80

Calls 2

key_for_idxMethod · 0.80
GetBitsMethod · 0.45

Tested by

no test coverage detected