MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / GetShadowColor

Function GetShadowColor

src/Drawer2D.h:100–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98/* Divides R/G/B by 4 */
99#define SHADOW_MASK (BitmapColor_R_Bits(0x3F) | BitmapColor_G_Bits(0x3F) | BitmapColor_B_Bits(0x3F))
100static CC_INLINE BitmapCol GetShadowColor(BitmapCol c) {
101 if (Drawer2D.BlackTextShadows) return BITMAPCOLOR_BLACK;
102
103 /* Initial layout: aaaa_aaaa|rrrr_rrrr|gggg_gggg|bbbb_bbbb */
104 /* Shift right 2: 00aa_aaaa|aarr_rrrr|rrgg_gggg|ggbb_bbbb */
105 /* And by 3f3f3f: 0000_0000|00rr_rrrr|00gg_gggg|00bb_bbbb */
106 /* Or by alpha : aaaa_aaaa|00rr_rrrr|00gg_gggg|00bb_bbbb */
107 return (c & BITMAPCOLOR_A_MASK) | ((c >> 2) & SHADOW_MASK);
108}
109
110/* Allocates a new instance of the default font using the given size and flags */
111/* Uses Font_MakeBitmapped or SysFont_MakeDefault depending on Drawer2D_BitmappedText */

Callers 3

FallbackFont_DrawTextFunction · 0.85
SysFont_DrawTextFunction · 0.85
DrawBitmappedTextCoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected