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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*!
  2. * \file include/loader/LoaderTR2.h
  3. * \brief TR2 level file loader
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _LOADER_LOADER_TR2_H_
  8. #define _LOADER_LOADER_TR2_H_
  9. #include <array>
  10. #include <cstdint>
  11. #include "RoomData.h"
  12. #include "RoomMesh.h"
  13. #include "SkeletalModel.h"
  14. #include "utils/binary.h"
  15. #include "loader/Loader.h"
  16. class LoaderTR2 : public Loader {
  17. public:
  18. virtual int load(std::string f);
  19. protected:
  20. virtual void loadPalette();
  21. virtual void loadTextures();
  22. virtual void loadRoomLights();
  23. virtual void loadRoomStaticMeshes(std::vector<StaticModel*>& staticModels);
  24. virtual void loadRoomDataEnd(int16_t& alternateRoom, unsigned int& roomFlags);
  25. virtual void loadRoomVertex(RoomVertexTR2& vert);
  26. virtual void loadRoomMesh(std::vector<IndexedRectangle>& rectangles,
  27. std::vector<IndexedRectangle>& triangles,
  28. uint16_t& numRectangles, uint16_t& numTriangles);
  29. virtual void loadRooms();
  30. virtual void loadFloorData();
  31. virtual void loadMeshes();
  32. virtual void loadMoveables();
  33. virtual void loadStaticMeshes();
  34. virtual void loadTextiles();
  35. virtual void loadSprites();
  36. virtual void loadCameras();
  37. virtual void loadSoundSources();
  38. virtual void loadBoxesOverlapsZones();
  39. virtual void loadAnimatedTextures();
  40. virtual void loadItems();
  41. virtual void loadCinematicFrames();
  42. virtual void loadDemoData();
  43. virtual void loadSoundMap();
  44. virtual void loadSoundDetails();
  45. virtual void loadSampleIndices();
  46. virtual void loadExternalSoundFile(std::string f);
  47. virtual int loadSoundFiles(BinaryReader& sfx, unsigned int count = 0);
  48. virtual int getPaletteIndex(uint16_t index);
  49. virtual void loadAngleSet(BoneFrame* bf, BinaryReader& frame, uint16_t numMeshes,
  50. uint16_t startingMesh, uint32_t meshTree,
  51. uint32_t numMeshTrees, std::vector<int32_t> meshTrees);
  52. virtual BoneFrame* loadFrame(BinaryReader& frame, uint16_t numMeshes,
  53. uint16_t startingMesh, uint32_t meshTree,
  54. uint32_t numMeshTrees, std::vector<int32_t> meshTrees);
  55. };
  56. #endif