// // Created by sfd on 25-8-4. // #ifndef ENTRY_H #define ENTRY_H #include #include #include "Core.h" namespace PKG { enum class TexFormat { RGBA8888 = 0, DXT5 = 4, DXT3 = 6, DXT1 = 7, RG88 = 8, R8 = 9 }; enum class TexType { None = 0, NoInterpolation = 1, ClampUVs = 2, IsGif = 4, // Placeholders Unk3 = 8, Unk4 = 16, IsVideoTexture = 32, Unk6 = 64, Unk7 = 128, }; enum class MipmapFormat { Invalid = 0, /// Raw pixels (4 bytes per pixel) (RGBA8888) RGBA8888 = 1, /// Raw pixels (1 byte per pixel) (R8) R8 = 2, /// Raw pixels (2 bytes per pixel) (RG88) RG88 = 3, /// Raw pixels compressed using DXT5 CompressedDXT5, /// Raw pixels compressed using DXT3 CompressedDXT3, /// Raw pixels compressed using DXT1 CompressedDXT1, /// MP4 Video VideoMp4, /// Windows or OS/2 Bitmap File (*.BMP) /// Keep '= 1000' because MipmapFormatExtensions.IsImage uses this to check if format is an image format ImageBMP = 1000, /// Windows Icon (*.ICO) ImageICO, /// Independent JPEG Group (*.JPG, *.JIF, *.JPEG, *.JPE) ImageJPEG, /// JPEG Network Graphics (*.JNG) ImageJNG, /// Commodore 64 Koala format (*.KOA) ImageKOALA, /// Amiga IFF (*.IFF, *.LBM) ImageLBM, /// Amiga IFF (*.IFF, *.LBM) ImageIFF, /// Multiple Network Graphics (*.MNG) ImageMNG, /// Portable Bitmap (ASCII) (*.PBM) ImagePBM, /// Portable Bitmap (BINARY) (*.PBM) ImagePBMRAW, /// Kodak PhotoCD (*.PCD) ImagePCD, /// Zsoft Paintbrush PCX bitmap format (*.PCX) ImagePCX, /// Portable Graymap (ASCII) (*.PGM) ImagePGM, /// Portable Graymap (BINARY) (*.PGM) ImagePGMRAW, /// Portable Network Graphics (*.PNG) ImagePNG, /// Portable Pixelmap (ASCII) (*.PPM) ImagePPM, /// Portable Pixelmap (BINARY) (*.PPM) ImagePPMRAW, /// Sun Rasterfile (*.RAS) ImageRAS, /// truevision Targa files (*.TGA, *.TARGA) ImageTARGA, /// Tagged Image File Format (*.TIF, *.TIFF) ImageTIFF, /// Wireless Bitmap (*.WBMP) ImageWBMP, /// Adobe Photoshop (*.PSD) ImagePSD, /// Dr. Halo (*.CUT) ImageCUT, /// X11 Bitmap Format (*.XBM) ImageXBM, /// X11 Pixmap Format (*.XPM) ImageXPM, /// DirectDraw Surface (*.DDS) ImageDDS, /// Graphics Interchange Format (*.GIF) ImageGIF, /// High Dynamic Range (*.HDR) ImageHDR, /// Raw Fax format CCITT G3 (*.G3) ImageFAXG3, /// Silicon Graphics SGI image format (*.SGI) ImageSGI, /// OpenEXR format (*.EXR) ImageEXR, /// JPEG-2000 format (*.J2K, *.J2C) ImageJ2K, /// JPEG-2000 format (*.JP2) ImageJP2, /// Portable FloatMap (*.PFM) ImagePFM, /// Macintosh PICT (*.PICT) ImagePICT, /// RAW camera image (*.*) ImageRAW, }; enum class FreeImageFormat { /// /// Unknown format (returned value only, never use it as input value) /// FIF_UNKNOWN = -1, /// /// Windows or OS/2 Bitmap File (*.BMP) /// FIF_BMP = 0, /// /// Windows Icon (*.ICO) /// FIF_ICO = 1, /// /// Independent JPEG Group (*.JPG, *.JIF, *.JPEG, *.JPE) /// FIF_JPEG = 2, /// /// JPEG Network Graphics (*.JNG) /// FIF_JNG = 3, /// /// Commodore 64 Koala format (*.KOA) /// FIF_KOALA = 4, /// /// Amiga IFF (*.IFF, *.LBM) /// FIF_LBM = 5, /// /// Amiga IFF (*.IFF, *.LBM) /// FIF_IFF = 5, /// /// Multiple Network Graphics (*.MNG) /// FIF_MNG = 6, /// /// Portable Bitmap (ASCII) (*.PBM) /// FIF_PBM = 7, /// /// Portable Bitmap (BINARY) (*.PBM) /// FIF_PBMRAW = 8, /// /// Kodak PhotoCD (*.PCD) /// FIF_PCD = 9, /// /// Zsoft Paintbrush PCX bitmap format (*.PCX) /// FIF_PCX = 10, /// /// Portable Graymap (ASCII) (*.PGM) /// FIF_PGM = 11, /// /// Portable Graymap (BINARY) (*.PGM) /// FIF_PGMRAW = 12, /// /// Portable Network Graphics (*.PNG) /// FIF_PNG = 13, /// /// Portable Pixelmap (ASCII) (*.PPM) /// FIF_PPM = 14, /// /// Portable Pixelmap (BINARY) (*.PPM) /// FIF_PPMRAW = 15, /// /// Sun Rasterfile (*.RAS) /// FIF_RAS = 16, /// /// truevision Targa files (*.TGA, *.TARGA) /// FIF_TARGA = 17, /// /// Tagged Image File Format (*.TIF, *.TIFF) /// FIF_TIFF = 18, /// /// Wireless Bitmap (*.WBMP) /// FIF_WBMP = 19, /// /// Adobe Photoshop (*.PSD) /// FIF_PSD = 20, /// /// Dr. Halo (*.CUT) /// FIF_CUT = 21, /// /// X11 Bitmap Format (*.XBM) /// FIF_XBM = 22, /// /// X11 Pixmap Format (*.XPM) /// FIF_XPM = 23, /// /// DirectDraw Surface (*.DDS) /// FIF_DDS = 24, /// /// Graphics Interchange Format (*.GIF) /// FIF_GIF = 25, /// /// High Dynamic Range (*.HDR) /// FIF_HDR = 26, /// /// Raw Fax format CCITT G3 (*.G3) /// FIF_FAXG3 = 27, /// /// Silicon Graphics SGI image format (*.SGI) /// FIF_SGI = 28, /// /// OpenEXR format (*.EXR) /// FIF_EXR = 29, /// /// JPEG-2000 format (*.J2K, *.J2C) /// FIF_J2K = 30, /// /// JPEG-2000 format (*.JP2) /// FIF_JP2 = 31, /// /// Portable FloatMap (*.PFM) /// FIF_PFM = 32, /// /// Macintosh PICT (*.PICT) /// FIF_PICT = 33, /// /// RAW camera image (*.*) /// FIF_RAW = 34, /// /// RAW camera MP4 (*.mp4) /// FIF_MP4 = 35, }; struct PKG_API Entry { std::filesystem::path FullPath; int32_t Offset{}; int32_t Length{}; std::string Type; }; struct PKG_API TexHeader { TexFormat Format; TexType Flags; int32_t TextureWidth; int32_t TextureHeight; int32_t ImageWidth; int32_t ImageHeight; uint32_t UnkInt0; }; } #endif //ENTRY_H