MCPcopy Create free account
hub / github.com/DentonW/DevIL / XpmInsertEntry

Function XpmInsertEntry

DevIL/src-IL/src/il_xpm.cpp:198–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197
198void XpmInsertEntry(XPMHASHENTRY **Table, const ILubyte* Name, int Len, XpmPixel Colour)
199{
200 XPMHASHENTRY* NewEntry;
201 ILuint Index;
202 Index = XpmHash(Name, Len);
203
204 NewEntry = (XPMHASHENTRY*)ialloc(sizeof(XPMHASHENTRY));
205 if (NewEntry != NULL) {
206 NewEntry->Next = Table[Index];
207 memcpy(NewEntry->ColourName, Name, Len);
208 memcpy(NewEntry->ColourValue, Colour, sizeof(XpmPixel));
209 Table[Index] = NewEntry;
210 }
211}
212
213
214void XpmGetEntry(XPMHASHENTRY **Table, const ILubyte* Name, int Len, XpmPixel Colour)

Callers 1

XpmGetColourFunction · 0.85

Calls 1

XpmHashFunction · 0.85

Tested by

no test coverage detected