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

Function LoadPalette

Source/palette.cpp:76–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void LoadPalette(char *pszFileName)
77{
78 int i;
79 void *pBuf;
80 BYTE PalData[256][3];
81
82 assert(pszFileName);
83
84 WOpenFile(pszFileName, &pBuf, FALSE);
85 WReadFile(pBuf, (char *)PalData, sizeof(PalData), pszFileName);
86 WCloseFile(pBuf);
87
88 for (i = 0; i < 256; i++) {
89 orig_palette[i].r = PalData[i][0];
90 orig_palette[i].g = PalData[i][1];
91 orig_palette[i].b = PalData[i][2];
92#ifndef USE_SDL1
93 orig_palette[i].a = SDL_ALPHA_OPAQUE;
94#endif
95 }
96}
97
98void LoadRndLvlPal(int l)
99{

Callers 5

InitCutsceneFunction · 0.85
CheckQuestsFunction · 0.85
ResyncQuestsFunction · 0.85
LoadSetMapFunction · 0.85
LoadRndLvlPalFunction · 0.85

Calls 3

WOpenFileFunction · 0.85
WReadFileFunction · 0.85
WCloseFileFunction · 0.85

Tested by

no test coverage detected