Reads an icon file.
| 20 | |
| 21 | //! Reads an icon file. |
| 22 | ILboolean ilLoadIcon(ILconst_string FileName) |
| 23 | { |
| 24 | ILHANDLE IconFile; |
| 25 | ILboolean bIcon = IL_FALSE; |
| 26 | |
| 27 | IconFile = iopenr(FileName); |
| 28 | if (IconFile == NULL) { |
| 29 | ilSetError(IL_COULD_NOT_OPEN_FILE); |
| 30 | return bIcon; |
| 31 | } |
| 32 | |
| 33 | bIcon = ilLoadIconF(IconFile); |
| 34 | icloser(IconFile); |
| 35 | |
| 36 | return bIcon; |
| 37 | } |
| 38 | |
| 39 | |
| 40 | //! Reads an already-opened icon file. |