Subversion Repositories eduke32

Rev

Rev 8487 | Rev 8490 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8487 Rev 8488
Line 141... Line 141...
141
//
141
//
142
// loadpalette (internal)
142
// loadpalette (internal)
143
//
143
//
144
void paletteLoadFromDisk(void)
144
void paletteLoadFromDisk(void)
145
{
145
{
146
    initfastcolorlookup_scale(30, 59, 11);
146
    paletteInitClosestColorScale(30, 59, 11);
147
    initfastcolorlookup_gridvectors();
147
    paletteInitClosestColorGrid();
148
148
149
#ifdef USE_OPENGL
149
#ifdef USE_OPENGL
150
    for (auto & x : glblend)
150
    for (auto & x : glblend)
151
        x = defaultglblend;
151
        x = defaultglblend;
152
#endif
152
#endif
Line 162... Line 162...
162
        return kclose(fil);
162
        return kclose(fil);
163
163
164
    for (unsigned char & k : palette)
164
    for (unsigned char & k : palette)
165
        k <<= 2;
165
        k <<= 2;
166
166
167
    initfastcolorlookup_palette(palette);
167
    paletteInitClosestColorMap(palette);
168
168
169
    paletteloaded |= PALETTE_MAIN;
169
    paletteloaded |= PALETTE_MAIN;
170
170
171
171
172
    // PALETTE_SHADES
172
    // PALETTE_SHADES
Line 331... Line 331...
331
    redcol = paletteGetClosestColor(255, 0, 0);
331
    redcol = paletteGetClosestColor(255, 0, 0);
332
332
333
    for (size_t i = 0; i<16; i++)
333
    for (size_t i = 0; i<16; i++)
334
    {
334
    {
335
        palette_t *edcol = (palette_t *) &vgapal16[4*i];
335
        palette_t *edcol = (palette_t *) &vgapal16[4*i];
336
        editorcolors[i] = getclosestcol_lim(edcol->b, edcol->g, edcol->r, 239);
336
        editorcolors[i] = paletteGetClosestColorUpToIndex(edcol->b, edcol->g, edcol->r, 239);
337
    }
337
    }
338
338
339
    // Bmemset(PaletteIndexFullbrights, 0, sizeof(PaletteIndexFullbrights));
339
    // Bmemset(PaletteIndexFullbrights, 0, sizeof(PaletteIndexFullbrights));
340
    for (bssize_t c = 0; c < 255; ++c) // skipping transparent color
340
    for (bssize_t c = 0; c < 255; ++c) // skipping transparent color
341
    {
341
    {