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

`#include "il_internal.h"`
`#include "il_psp.h"`

## Functions

ILboolean | ilIsValidPsp (ILconst_string FileName)
| Checks if the file specified in FileName is a valid Psp file.
ILboolean | ilIsValidPspF (ILHANDLE File)
| Checks if the ILHANDLE contains a valid Psp file at the current position.
ILboolean | ilIsValidPspL (const void *Lump, ILuint Size)
| Checks if Lump is a valid Psp lump.
ILboolean | iGetPspHead ()
ILboolean | iIsValidPsp ()
ILboolean | iCheckPsp ()
ILboolean | ilLoadPsp (ILconst_string FileName)
| Reads a PSP file.
ILboolean | ilLoadPspF (ILHANDLE File)
| Reads an already-opened PSP file.
ILboolean | ilLoadPspL (const void *Lump, ILuint Size)
| Reads from a memory "lump" that contains a PSP.
ILboolean | iLoadPspInternal ()
ILboolean | ReadGenAttributes ()
ILboolean | ParseChunks ()
ILboolean | ReadLayerBlock (ILuint BlockLen)
ILboolean | ReadAlphaBlock (ILuint BlockLen)
ILubyte * | GetChannel ()
ILboolean | UncompRLE (ILubyte *CompData, ILubyte *Data, ILuint CompLen)
ILboolean | ReadPalette (ILuint BlockLen)
ILboolean | AssembleImage ()
ILboolean | Cleanup ()

## Variables

ILubyte | PSPSignature [32]
ILubyte | GenAttHead [4]
GENATT_CHUNK | AttChunk
PSPHEAD | Header
ILuint | NumChannels
ILubyte ** | Channels = NULL
ILubyte * | Alpha = NULL
ILpal | Pal

## Function Documentation

ILboolean AssembleImage | ( | void |  | ) |

Referenced by iLoadPspInternal().

ILboolean Cleanup | ( | void |  | ) |

Referenced by iLoadPspInternal().

ILubyte* GetChannel | ( | void |  | ) |

Referenced by ReadAlphaBlock(), and ReadLayerBlock().

ILboolean iCheckPsp | ( | void |  | ) |

Referenced by iIsValidPsp(), and iLoadPspInternal().

ILboolean iGetPspHead | ( |  | ) |

Referenced by iIsValidPsp(), and iLoadPspInternal().

ILboolean iIsValidPsp | ( | void |  | ) |

Referenced by ilIsValidPspF(), and ilIsValidPspL().

ILboolean ilIsValidPsp | ( | ILconst_string | FileName | ) |

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

Referenced by ilIsValid().

ILboolean ilIsValidPspF | ( | ILHANDLE | File | ) |

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

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

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

Checks if Lump is a valid Psp lump.

Referenced by ilDetermineTypeL(), and ilIsValidL().

ILboolean ilLoadPsp | ( | ILconst_string | FileName | ) |

Reads a PSP file.

Referenced by ilLoad(), and ilLoadImage().

ILboolean ilLoadPspF | ( | ILHANDLE | File | ) |

Reads an already-opened PSP file.

Referenced by ilLoadF(), and ilLoadPsp().

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

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

Referenced by ilLoadL().

ILboolean iLoadPspInternal | ( | void |  | ) |

Referenced by ilLoadPspF(), and ilLoadPspL().

ILboolean ParseChunks | ( | void |  | ) |

Referenced by iLoadPspInternal().

ILboolean ReadAlphaBlock | ( | ILuint | BlockLen | ) |

Referenced by ParseChunks().

ILboolean ReadGenAttributes | ( | void |  | ) |

Referenced by iLoadPspInternal().

ILboolean ReadLayerBlock | ( | ILuint | BlockLen | ) |

Referenced by ParseChunks().

ILboolean ReadPalette | ( | ILuint | BlockLen | ) |

Referenced by ParseChunks().

ILboolean UncompRLE | ( | ILubyte * | CompData,
|  | ILubyte * | Data,
|  | ILuint | CompLen |
| ) |  |  |

Referenced by GetChannel().

## Variable Documentation

ILubyte* Alpha = NULL

Referenced by AssembleImage(), Cleanup(), Compress(), CompressToRXGB(), ilGetAlpha(), ilModAlpha(), iLoadPicInternal(), iLoadPspInternal(), and ReadAlphaBlock().

GENATT_CHUNK AttChunk

ILubyte** Channels = NULL

Referenced by AssembleImage(), Cleanup(), iLoadDdsCubemapInternal(), iLoadPicInternal(), iLoadPspInternal(), iLoadVtfInternal(), ReadLayerBlock(), and ReadMipmaps().

ILubyte GenAttHead[4]

Initial value:

     {
            0x7E, 0x42, 0x4B, 0x00
    }

PSPHEAD Header

Referenced by iIsValidGif(), iIsValidIcns(), iIsValidTpl(), iIsValidVtf(), iLoadBitmapInternal(), iLoadCutInternal(), iLoadDcxInternal(), iLoadExrInternal(), iLoadGifInternal(), iLoadHdrInternal(), iLoadIcnsInternal(), iLoadPcxInternal(), iLoadPicInternal(), iLoadPixInternal(), iLoadPsdInternal(), iLoadSgiInternal(), iLoadSunInternal(), iLoadTargaInternal(), iLoadTplInternal(), iLoadWalInternal(), iLoadWdpInternal(), iSaveExrInternal(), and iUncompressTgaData().

ILuint NumChannels

Referenced by AssembleImage(), Cleanup(), iLoadExrInternal(), and ReadLayerBlock().

ILpal Pal

Referenced by iCopyPal(), ilConvertPal(), ilLoadJascPal(), iLoadIconInternal(), and iLoadWalInternal().

ILubyte PSPSignature[32]

Initial value:

     {
            0x50, 0x61, 0x69, 0x6E, 0x74, 0x20, 0x53, 0x68, 0x6F, 0x70, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x49,
            0x6D, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x6C, 0x65, 0x0A, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00
    }