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 619B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 "utils/binary.h"
  12. class Loader {
  13. public:
  14. typedef enum {
  15. TR_UNKNOWN = 0,
  16. TR_1 = 1,
  17. TR_2 = 2,
  18. TR_3 = 3,
  19. TR_4 = 4,
  20. TR_5 = 5
  21. } LoaderVersion;
  22. static LoaderVersion checkFile(std::string f);
  23. static std::unique_ptr<Loader> createLoader(std::string f);
  24. virtual ~Loader();
  25. virtual int load(std::string f) = 0;
  26. protected:
  27. BinaryFile file;
  28. };
  29. #endif