Subversion Repositories eduke32

Rev

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

Rev 8488 Rev 8490
Line 328... Line 328...
328
328
329
    blackcol = paletteGetClosestColor(0, 0, 0);
329
    blackcol = paletteGetClosestColor(0, 0, 0);
330
    whitecol = paletteGetClosestColor(255, 255, 255);
330
    whitecol = paletteGetClosestColor(255, 255, 255);
331
    redcol = paletteGetClosestColor(255, 0, 0);
331
    redcol = paletteGetClosestColor(255, 0, 0);
332
332
333
    for (size_t i = 0; i<16; i++)
-
 
334
    {
-
 
335
        palette_t *edcol = (palette_t *) &vgapal16[4*i];
-
 
336
        editorcolors[i] = paletteGetClosestColorUpToIndex(edcol->b, edcol->g, edcol->r, 239);
-
 
337
    }
-
 
338
-
 
339
    // Bmemset(PaletteIndexFullbrights, 0, sizeof(PaletteIndexFullbrights));
333
    // Bmemset(PaletteIndexFullbrights, 0, sizeof(PaletteIndexFullbrights));
340
    for (bssize_t c = 0; c < 255; ++c) // skipping transparent color
334
    for (bssize_t c = 0; c < 255; ++c) // skipping transparent color
341
    {
335
    {
342
        uint8_t const index = palookup0[c];
336
        uint8_t const index = palookup0[c];
343
        rgb24_t const & color = *(rgb24_t *)&palette[index*3];
337
        rgb24_t const & color = *(rgb24_t *)&palette[index*3];
Line 370... Line 364...
370
            }
364
            }
371
        }
365
        }
372
        PostLoad_FoundShade: ;
366
        PostLoad_FoundShade: ;
373
        frealmaxshade = (float)(realmaxshade = s+1);
367
        frealmaxshade = (float)(realmaxshade = s+1);
374
    }
368
    }
-
 
369
-
 
370
    for (size_t i = 0; i<256; i++)
-
 
371
    {
-
 
372
        if (editorcolorsdef[i])
-
 
373
            continue;
-
 
374
-
 
375
        palette_t *edcol = (palette_t *) &vgapal16[4*i];
-
 
376
        editorcolors[i] = paletteGetClosestColorUpToIndex(edcol->b, edcol->g, edcol->r, 239);
-
 
377
    }
375
}
378
}
376
379
377
void paletteFixTranslucencyMask(void)
380
void paletteFixTranslucencyMask(void)
378
{
381
{
379
    for (auto thispalookup : palookup)
382
    for (auto thispalookup : palookup)