MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetBit

Function GetBit

trinity/Font/Tr2FontManager.cpp:423–428  ·  view source on GitHub ↗

A function to get the bit value from a b/w bitmap

Source from the content-addressed store, hash-verified

421
422//A function to get the bit value from a b/w bitmap
423inline int GetBit( uint8_t* line, int bit )
424{
425 const int c = (int)line[bit >> 3];
426 const int mask = 128 >> ( bit & 7 );
427 return c & mask;
428}
429
430bool Tr2FontManager::GetAtlasTextureForSbit( FTC_SBit sbit, Tr2AtlasTexture** at )
431{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected