MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / XLAT_RGB_TO_16

Function XLAT_RGB_TO_16

2dlib/surface.cpp:97–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95#include "renderer.h"
96
97static inline unsigned XLAT_RGB_TO_16(ddgr_color c) {
98 uint8_t r, g, b;
99 r = (uint8_t)((c & 0x00ff0000) >> 16);
100 g = (uint8_t)((c & 0x0000ff00) >> 8);
101 b = (uint8_t)(c & 0x000000ff);
102
103 return (((r >> 3) << 10) + ((g >> 3) << 5) + (b >> 3));
104}
105
106ddgr_surface_node *grSurface::surf_list = nullptr; // the surface list
107ddgr_surface_node *grSurface::surf_list_cur = nullptr; // current node on list.

Callers 1

replace_colorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected