Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Loader.h 638B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*!
  2. * \file include/loader/Loader.h
  3. * \brief Level file loader
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _LOADER_LOADER_H_
  8. #define _LOADER_LOADER_H_
  9. #include <memory>
  10. #include <string>
  11. #include <cstdint>
  12. #include "utils/binary.h"
  13. class Loader {
  14. public:
  15. typedef enum {
  16. TR_UNKNOWN = 0,
  17. TR_1 = 1,
  18. TR_2 = 2,
  19. TR_3 = 3,
  20. TR_4 = 4,
  21. TR_5 = 5
  22. } LoaderVersion;
  23. static LoaderVersion checkFile(std::string f);
  24. static std::unique_ptr<Loader> createLoader(std::string f);
  25. virtual ~Loader();
  26. virtual int load(std::string f) = 0;
  27. protected:
  28. BinaryFile file;
  29. };
  30. #endif