| 340 | |
| 341 | |
| 342 | ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num) |
| 343 | { |
| 344 | ILimage *Next, *Prev; |
| 345 | |
| 346 | ilBindImage(ilGetCurName()); // Make sure the current image is actually bound. |
| 347 | ilCloseImage(iCurImage->Next); // Close any current "next" images. |
| 348 | |
| 349 | iCurImage->Next = NULL; |
| 350 | if (Num == 0) // Just gets rid of all the "next" images. |
| 351 | return IL_TRUE; |
| 352 | |
| 353 | iCurImage->Next = ilNewImage(1, 1, 1, 1, 1); |
| 354 | if (iCurImage->Next == NULL) |
| 355 | return IL_FALSE; |
| 356 | Next = iCurImage->Next; |
| 357 | Num--; |
| 358 | |
| 359 | while (Num) { |
| 360 | Next->Next = ilNewImage(1, 1, 1, 1, 1); |
| 361 | if (Next->Next == NULL) { |
| 362 | // Clean up before we error out. |
| 363 | Prev = iCurImage->Next; |
| 364 | while (Prev) { |
| 365 | Next = Prev->Next; |
| 366 | ilCloseImage(Prev); |
| 367 | Prev = Next; |
| 368 | } |
| 369 | return IL_FALSE; |
| 370 | } |
| 371 | Next = Next->Next; |
| 372 | Num--; |
| 373 | } |
| 374 | |
| 375 | return IL_TRUE; |
| 376 | } |
| 377 | |
| 378 | |
| 379 | void ILAPIENTRY ilRegisterType(ILenum Type) |
nothing calls this directly
no test coverage detected