# E:/DevIL/src-IL/src/il_tpl.c File Reference

`#include "il_internal.h"`
`#include "il_dds.h"`

## Data Structures

struct | TPLHEAD

## Defines

#define | TPL_I4 0
#define | TPL_I8 1
#define | TPL_IA4 2
#define | TPL_IA8 3
#define | TPL_RGB565 4
#define | TPL_RGB5A3 5
#define | TPL_RGBA8 6
#define | TPL_CI4 8
#define | TPL_CI8 9
#define | TPL_CI14X2 10
#define | TPL_CMP 14
#define | TPL_CLAMP 0
#define | TPL_REPEAT 1
#define | TPL_MIRROR 2
#define | TPL_PAL_IA8 0
#define | TPL_PAL_RGB565 1
#define | TPL_PAL_RGB5A3 2

## Functions

ILboolean | iIsValidTpl (void)
ILboolean | iCheckTpl (TPLHEAD *Header)
ILboolean | iLoadTplInternal (void)
ILboolean | TplGetIndexImage (ILimage *Image, ILuint TexOff, ILuint DataFormat)
ILboolean | ilIsValidTpl (ILconst_string FileName)
| Checks if the file specified in FileName is a valid TPL file.
ILboolean | ilIsValidTplF (ILHANDLE File)
| Checks if the ILHANDLE contains a valid TPL file at the current position.
ILboolean | ilIsValidTplL (const void *Lump, ILuint Size)
| Checks if Lump is a valid TPL lump.
ILboolean | iGetTplHead (TPLHEAD *Header)
ILboolean | ilLoadTpl (ILconst_string FileName)
| Reads a TPL file.
ILboolean | ilLoadTplF (ILHANDLE File)
| Reads an already-opened TPL file.
ILboolean | ilLoadTplL (const void *Lump, ILuint Size)
| Reads from a memory "lump" that contains a TPL.

## Define Documentation

#define TPL_CI14X2 10

Referenced by iLoadTplInternal(), and TplGetIndexImage().

#define TPL_CI4 8

Referenced by iLoadTplInternal(), and TplGetIndexImage().

#define TPL_CI8 9

Referenced by iLoadTplInternal(), and TplGetIndexImage().

#define TPL_CLAMP 0

#define TPL_CMP 14

Referenced by iLoadTplInternal().

#define TPL_I4 0

Referenced by iLoadTplInternal().

#define TPL_I8 1

Referenced by iLoadTplInternal().

#define TPL_IA4 2

Referenced by iLoadTplInternal().

#define TPL_IA8 3

Referenced by iLoadTplInternal().

#define TPL_MIRROR 2

Referenced by iLoadTplInternal().

#define TPL_PAL_IA8 0

Referenced by TplGetIndexImage().

#define TPL_PAL_RGB565 1

Referenced by TplGetIndexImage().

#define TPL_PAL_RGB5A3 2

Referenced by TplGetIndexImage().

#define TPL_REPEAT 1

Referenced by iLoadTplInternal().

#define TPL_RGB565 4

Referenced by iLoadTplInternal().

#define TPL_RGB5A3 5

Referenced by iLoadTplInternal().

#define TPL_RGBA8 6

Referenced by iLoadTplInternal().

## Function Documentation

ILboolean iCheckTpl | ( | TPLHEAD * | Header | ) |

Referenced by iIsValidTpl(), and iLoadTplInternal().

ILboolean iGetTplHead | ( | TPLHEAD * | Header | ) |

Referenced by iIsValidTpl(), and iLoadTplInternal().

ILboolean iIsValidTpl | ( | void |  | ) |

Referenced by ilIsValidTplF(), and ilIsValidTplL().

ILboolean ilIsValidTpl | ( | ILconst_string | FileName | ) |

Checks if the file specified in FileName is a valid TPL file.

Referenced by ilIsValid().

ILboolean ilIsValidTplF | ( | ILHANDLE | File | ) |

Checks if the ILHANDLE contains a valid TPL file at the current position.

Referenced by ilDetermineTypeF(), ilIsValidF(), and ilIsValidTpl().

ILboolean ilIsValidTplL | ( | const void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Checks if Lump is a valid TPL lump.

Referenced by ilDetermineTypeL(), and ilIsValidL().

ILboolean ilLoadTpl | ( | ILconst_string | FileName | ) |

Reads a TPL file.

Referenced by ilLoad(), and ilLoadImage().

ILboolean ilLoadTplF | ( | ILHANDLE | File | ) |

Reads an already-opened TPL file.

Referenced by ilLoadF(), and ilLoadTpl().

ILboolean ilLoadTplL | ( | const void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Reads from a memory "lump" that contains a TPL.

Referenced by ilLoadL().

ILboolean iLoadTplInternal | ( | void |  | ) |

Referenced by ilLoadTplF(), and ilLoadTplL().

ILboolean TplGetIndexImage | ( | ILimage * | Image,
|  | ILuint | TexOff,
|  | ILuint | DataFormat |
| ) |  |  |

Referenced by iLoadTplInternal().