MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY ilRegisterPal

Function ILAPIENTRY ilRegisterPal

DevIL/src-IL/src/il_register.cpp:401–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399
400
401void ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Type)
402{
403 if (!iCurImage->Pal.Palette || !iCurImage->Pal.PalSize || iCurImage->Pal.PalType != IL_PAL_NONE) {
404 ifree(iCurImage->Pal.Palette);
405 }
406
407 iCurImage->Pal.PalSize = Size;
408 iCurImage->Pal.PalType = Type;
409 iCurImage->Pal.Palette = (ILubyte*)ialloc(Size);
410 if (iCurImage->Pal.Palette == NULL)
411 return;
412
413 if (Pal != NULL) {
414 memcpy(iCurImage->Pal.Palette, Pal, Size);
415 }
416 else {
417 ilSetError(IL_INVALID_PARAM);
418 }
419
420 return;
421}
422
423
424ILboolean ILAPIENTRY ilSetDuration(ILuint Duration)

Callers

nothing calls this directly

Calls 1

ilSetErrorFunction · 0.85

Tested by

no test coverage detected