MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / level_loadPalette

Function level_loadPalette

TheForceEngine/TFE_Jedi/Level/level.cpp:86–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }
85
86 void level_loadPalette()
87 {
88 // Palette *IS* loaded from the level file.
89 FilePath filePath;
90 if (TFE_Paths::getFilePath(s_levelState.levelPaletteName, &filePath))
91 {
92 FileStream::readContents(&filePath, s_levelPalette, 768);
93 }
94 else if (TFE_Paths::getFilePath("default.pal", &filePath))
95 {
96 FileStream::readContents(&filePath, s_levelPalette, 768);
97 }
98 // The "base palette" is adjusted by the hud colors, which is why it is a copy.
99 memcpy(s_basePalette, s_levelPalette, 768);
100 s_palModified = JTRUE;
101 }
102
103 void level_postProcessGeometry()
104 {

Callers 3

level_loadGeometryBinFunction · 0.85
level_loadGeometryFunction · 0.85
level_serializePaletteFunction · 0.85

Calls 1

getFilePathFunction · 0.50

Tested by

no test coverage detected