Files
commandergenius/src/fileio/CExeFile.h
2009-07-22 16:38:10 +00:00

37 lines
673 B
C++

/*
* CExeFile.h
*
* Created on: 17.07.2009
* Author: gerstrong
*
* This special class reads the whole exe-file
* into the memory and decompresses if necessary
*/
#ifndef CEXEFILE_H_
#define CEXEFILE_H_
#include <vector>
using namespace std;
class CExeFile {
public:
CExeFile(int episode, char *datadirectory);
virtual ~CExeFile();
bool readData();
int getEXEVersion();
unsigned char* getData();
private:
int m_datasize;
int m_episode;
unsigned char *m_data;
char *m_datadirectory;
int get_bit(int *p_bit_count, unsigned char *fin, int *posin);
int unlzexe(unsigned char *fin, vector<unsigned char> *outbuffer);
};
#endif /* CEXEFILE_H_ */