- Main Page
- Data Structures
- Files

# /home/dwoods/DevIL/src-IL/include/il_utx.h

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Sources
    00004 // Copyright (C) 2000-2009 by Denton Woods
    00005 // Last modified: 03/02/2009
    00006 //
    00007 // Filename: src-IL/include/il_utx.h
    00008 //
    00009 // Description: Reads from an Unreal and Unreal Tournament Texture (.utx) file.
    00010 //                              Specifications can be found at
    00011 //                              http://wiki.beyondunreal.com/Legacy:Package_File_Format.
    00012 //
    00013 //-----------------------------------------------------------------------------
    00014
    00015
    00016 #ifndef UTX_H
    00017 #define UTX_H
    00018
    00019 #ifdef __cplusplus
    00020 extern "C" {
    00021 #endif
    00022
    00023 #include "il_internal.h"
    00024 #include "il_dds.h"
    00025
    00026 #ifdef __cplusplus
    00027 }
    00028 #endif
    00029
    00030
    00031 #include <memory>
    00032 #include <vector>
    00033 #include <string>
    00034 using namespace std;
    00035
    00036
    00037 typedef struct UTXHEADER
    00038 {
    00039         ILuint          Signature;
    00040         ILushort        Version;
    00041         ILushort        LicenseMode;
    00042         ILuint          Flags;
    00043         ILuint          NameCount;
    00044         ILuint          NameOffset;
    00045         ILuint          ExportCount;
    00046         ILuint          ExportOffset;
    00047         ILuint          ImportCount;
    00048         ILuint          ImportOffset;
    00049 } UTXHEADER;
    00050
    00051 typedef struct UTXENTRYNAME
    00052 {
    00053         //char  *Name;
    00054         string  Name;
    00055         ILuint  Flags;
    00056 } UTXENTRYNAME;
    00057
    00058 typedef struct UTXEXPORTTABLE
    00059 {
    00060         ILint   Class;
    00061         ILint   Super;
    00062         ILint   Group;
    00063         ILint   ObjectName;
    00064         ILuint  ObjectFlags;
    00065         ILint   SerialSize;
    00066         ILint   SerialOffset;
    00067
    00068         ILboolean       ClassImported;
    00069         ILboolean       SuperImported;
    00070         ILboolean       GroupImported;
    00071 } UTXEXPORTTABLE;
    00072
    00073 typedef struct UTXIMPORTTABLE
    00074 {
    00075         ILint           ClassPackage;
    00076         ILint           ClassName;
    00077         ILint           Package;
    00078         ILint           ObjectName;
    00079
    00080         ILboolean       PackageImported;
    00081 } UTXIMPORTTABLE;
    00082
    00083 class UTXPALETTE
    00084 {
    00085 public:
    00086         UTXPALETTE() { Pal = NULL; }
    00087         ~UTXPALETTE() { delete [] Pal; }
    00088
    00089         ILubyte *Pal;
    00090         ILuint  Count;
    00091         ILuint  Name;
    00092 };
    00093
    00094 // Data formats
    00095 #define UTX_P8          0x00
    00096 #define UTX_DXT1        0x03
    00097
    00098 ILboolean iLoadUtxInternal(void);
    00099
    00100 #endif//UTX_H