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

Function isLBM

DevIL/src-IL/src/il_ilbm.cpp:221–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219} BMHD;
220
221static int isLBM()
222{
223 SDL_RWops* src = 0;
224 int start;
225 int is_LBM;
226 Uint8 magic[4+4+4];
227
228 start = SDL_RWtell(src);
229 is_LBM = 0;
230 if ( SDL_RWread( src, magic, sizeof(magic), 1 ) )
231 {
232 if ( !memcmp( magic, "FORM", 4 ) &&
233 ( !memcmp( magic + 8, "PBM ", 4 ) ||
234 !memcmp( magic + 8, "ILBM", 4 ) ) )
235 {
236 is_LBM = 1;
237 }
238 }
239 SDL_RWseek(src, start, SEEK_SET);
240 return( is_LBM );
241}
242
243static ILboolean load_ilbm(void)
244{

Callers 1

iIsValidIlbmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected