#ifndef CLODHANDLER_H #define CLODHANDLER_H #include #include #include #include #include "zlib.h" #include "CDefHandler.h" enum Epcxformat {PCX8B, PCX24B}; namespace NLoadHandlerHelp { const int dmHelp=0, dmNoExtractingMask=1; //std::string P1,P2,CurDir; const int fCHUNK = 50000; }; struct Entry { unsigned char name[12], //filename hlam_1[4], // hlam_2[4]; // std::string nameStr; int offset, //from beginning realSize, //size without compression size; //and with bool operator<(const Entry & comp) const { return this->nameStr entries; unsigned int totalFiles; int readNormalNr (unsigned char* bufor, int bytCon, bool cyclic=false); //lod header reading helper int decompress (unsigned char * source, int size, int realSize, std::ofstream & dest); //main decompression function int decompress (unsigned char * source, int size, int realSize, std::string & dest); //main decompression function int infm(FILE *source, FILE *dest, int wBits = 15); //zlib handler int infs(unsigned char * in, int size, int realSize, std::ofstream & out, int wBits=15); //zlib fast handler int infs2(unsigned char * in, int size, int realSize, unsigned char*& out, int wBits=15); //zlib fast handler std::vector extractManyFiles(std::vector defNamesIn); //extrats given files (defs only) CDefHandler * giveDef(std::string defName); void extract(std::string FName); void extractFile(std::string FName, std::string name); //extracts a specific file void init(std::string lodFile); SDL_Surface * loadBitmap(std::string fname); }; #endif //CLODHANDLER_H