Open Source Tomb Raider Engine
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Loader.h 612B

1234567891011121314151617181920212223242526272829303132333435363738
  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 int load(std::string f) = 0;
  26. protected:
  27. BinaryFile file;
  28. };
  29. #endif