CSndHandler.h 674 B

1234567891011121314151617181920212223
  1. #include <vector>
  2. #include <fstream>
  3. class CSndHandler
  4. {
  5. protected:
  6. const int CHUNK;
  7. struct Entry
  8. {
  9. std::string name;
  10. int size, offset;
  11. };
  12. std::ifstream file;
  13. int readNormalNr (int pos, int bytCon);
  14. bool opened;
  15. public:
  16. std::vector<Entry> entries;
  17. ~CSndHandler();
  18. CSndHandler(std::string fname);
  19. void extract(std::string srcfile, std::string dstfile, bool caseSens=true); //saves selected file
  20. unsigned char * extract (std::string srcfile, int & size); //return selecte file
  21. void extract(int index, std::string dstfile); //saves selected file
  22. unsigned char * extract (int index, int & size); //return selecte file - NIE TESTOWANE
  23. };