Used for setting the current layer if layers exist.
| 418 | |
| 419 | //! Used for setting the current layer if layers exist. |
| 420 | ILboolean ILAPIENTRY ilActiveLayer(ILuint Number) |
| 421 | { |
| 422 | ILuint Current; |
| 423 | ILimage *iTempImage; |
| 424 | |
| 425 | if (iCurImage == NULL) { |
| 426 | ilSetError(IL_ILLEGAL_OPERATION); |
| 427 | return IL_FALSE; |
| 428 | } |
| 429 | |
| 430 | if (Number == 0) { |
| 431 | return IL_TRUE; |
| 432 | } |
| 433 | |
| 434 | iTempImage = iCurImage; |
| 435 | iCurImage = iCurImage->Layers; |
| 436 | if (iCurImage == NULL) { |
| 437 | iCurImage = iTempImage; |
| 438 | ilSetError(IL_ILLEGAL_OPERATION); |
| 439 | return IL_FALSE; |
| 440 | } |
| 441 | |
| 442 | //Number--; // Skip 0 (parent image) |
| 443 | for (Current = 1; Current < Number; Current++) { |
| 444 | iCurImage = iCurImage->Layers; |
| 445 | if (iCurImage == NULL) { |
| 446 | ilSetError(IL_ILLEGAL_OPERATION); |
| 447 | iCurImage = iTempImage; |
| 448 | return IL_FALSE; |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | ParentImage = IL_FALSE; |
| 453 | |
| 454 | return IL_TRUE; |
| 455 | } |
| 456 | |
| 457 | |
| 458 | ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num) |
nothing calls this directly
no test coverage detected