Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

binary.h 536B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*!
  2. * \file include/utils/binary.h
  3. * \brief Binary file reading utilities
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _UTILS_BINARY_H_
  8. #define _UTILS_BINARY_H_
  9. #include <fstream>
  10. class BinaryFile {
  11. public:
  12. BinaryFile(const char *f);
  13. ~BinaryFile();
  14. long long tell();
  15. void seek(long long pos);
  16. int8_t read8();
  17. uint8_t readU8();
  18. int16_t read16();
  19. uint16_t readU16();
  20. int32_t read32();
  21. uint32_t readU32();
  22. int64_t read64();
  23. uint64_t readU64();
  24. private:
  25. std::ifstream file;
  26. };
  27. #endif