MCPcopy Create free account
hub / github.com/diasurgical/devilution / CapturePal

Function CapturePal

Source/capture.cpp:30–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30static BOOL CapturePal(SDL_Color *palette, std::ofstream *out)
31{
32 BYTE pcx_palette[769];
33 int i;
34
35 pcx_palette[0] = 12;
36 for (i = 0; i < 256; i++) {
37 pcx_palette[1 + 3 * i + 0] = palette[i].r;
38 pcx_palette[1 + 3 * i + 1] = palette[i].g;
39 pcx_palette[1 + 3 * i + 2] = palette[i].b;
40 }
41
42 out->write(reinterpret_cast<const char *>(pcx_palette), sizeof(pcx_palette));
43 return !out->fail();
44}
45
46static BYTE *CaptureEnc(BYTE *src, BYTE *dst, int width)
47{

Callers 1

CaptureScreenFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected