OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
LoaderTR2.h
Go to the documentation of this file.
1 
8 #ifndef _LOADER_LOADER_TR2_H_
9 #define _LOADER_LOADER_TR2_H_
10 
11 #include <array>
12 #include <cstdint>
13 
14 #include "RoomData.h"
15 #include "RoomMesh.h"
16 #include "SkeletalModel.h"
17 #include "utils/binary.h"
18 #include "loader/Loader.h"
19 
20 class LoaderTR2 : public Loader {
21  public:
22  virtual int load(std::string f);
23 
24  protected:
25  virtual void loadPalette();
26  virtual void loadTextures();
27  virtual void loadRoomLights();
28  virtual void loadRoomStaticMeshes(std::vector<StaticModel*>& staticModels);
29  virtual void loadRoomDataEnd(int16_t& alternateRoom, unsigned int& roomFlags);
30  virtual void loadRoomVertex(RoomVertexTR2& vert);
31  virtual void loadRoomMesh(std::vector<IndexedRectangle>& rectangles,
32  std::vector<IndexedRectangle>& triangles,
33  uint16_t& numRectangles, uint16_t& numTriangles);
34  virtual void loadRooms();
35  virtual void loadFloorData();
36  virtual void loadMeshes();
37  virtual void loadMoveables();
38  virtual void loadStaticMeshes();
39  virtual void loadTextiles();
40  virtual void loadSprites();
41  virtual void loadCameras();
42  virtual void loadSoundSources();
43  virtual void loadBoxesOverlapsZones();
44  virtual void loadAnimatedTextures();
45  virtual void loadItems();
46  virtual void loadCinematicFrames();
47  virtual void loadDemoData();
48  virtual void loadSoundMap();
49  virtual void loadSoundDetails();
50  virtual void loadSampleIndices();
51 
52  virtual void loadExternalSoundFile(std::string f);
53  virtual int loadSoundFiles(BinaryReader& sfx, unsigned int count = 0);
54 
55  virtual int getPaletteIndex(uint16_t index);
56  virtual void loadAngleSet(BoneFrame* bf, BinaryReader& frame, uint16_t numMeshes,
57  uint16_t startingMesh, uint32_t meshTree,
58  uint32_t numMeshTrees, std::vector<int32_t> meshTrees);
59  virtual BoneFrame* loadFrame(BinaryReader& frame, uint16_t numMeshes,
60  uint16_t startingMesh, uint32_t meshTree,
61  uint32_t numMeshTrees, std::vector<int32_t> meshTrees);
62 };
63 
64 #endif
65 
virtual void loadPalette()
Definition: LoaderTR2.cpp:66
virtual void loadAngleSet(BoneFrame *bf, BinaryReader &frame, uint16_t numMeshes, uint16_t startingMesh, uint32_t meshTree, uint32_t numMeshTrees, std::vector< int32_t > meshTrees)
Definition: LoaderTR2.cpp:719
virtual void loadAnimatedTextures()
Definition: LoaderTR2.cpp:155
Level file loader.
virtual void loadSoundSources()
Definition: LoaderTR2.cpp:1084
Binary file reading utilities.
virtual void loadSoundMap()
Definition: LoaderTR2.cpp:1107
virtual int getPaletteIndex(uint16_t index)
Definition: LoaderTR2.cpp:523
virtual int loadSoundFiles(BinaryReader &sfx, unsigned int count=0)
Definition: LoaderTR2.cpp:1173
virtual void loadCinematicFrames()
Definition: LoaderTR2.cpp:1226
virtual void loadSampleIndices()
Definition: LoaderTR2.cpp:1136
virtual void loadTextiles()
Definition: LoaderTR2.cpp:108
virtual void loadMeshes()
Definition: LoaderTR2.cpp:527
virtual void loadItems()
Definition: LoaderTR2.cpp:976
virtual void loadStaticMeshes()
Definition: LoaderTR2.cpp:648
virtual BoneFrame * loadFrame(BinaryReader &frame, uint16_t numMeshes, uint16_t startingMesh, uint32_t meshTree, uint32_t numMeshTrees, std::vector< int32_t > meshTrees)
Definition: LoaderTR2.cpp:764
virtual void loadRoomVertex(RoomVertexTR2 &vert)
Definition: LoaderTR2.cpp:249
Auxiliary Room classes.
virtual void loadRoomLights()
Definition: LoaderTR2.cpp:191
virtual void loadRoomMesh(std::vector< IndexedRectangle > &rectangles, std::vector< IndexedRectangle > &triangles, uint16_t &numRectangles, uint16_t &numTriangles)
Definition: LoaderTR2.cpp:258
virtual void loadSprites()
Definition: LoaderTR2.cpp:480
virtual void loadCameras()
Definition: LoaderTR2.cpp:1209
Moveable Mesh Geometry.
virtual int load(std::string f)
Definition: LoaderTR2.cpp:24
virtual void loadRoomStaticMeshes(std::vector< StaticModel * > &staticModels)
Definition: LoaderTR2.cpp:213
virtual void loadRoomDataEnd(int16_t &alternateRoom, unsigned int &roomFlags)
Definition: LoaderTR2.cpp:239
virtual void loadTextures()
Definition: LoaderTR2.cpp:81
virtual void loadMoveables()
Definition: LoaderTR2.cpp:785
virtual void loadSoundDetails()
Definition: LoaderTR2.cpp:1113
virtual void loadRooms()
Definition: LoaderTR2.cpp:289
Room Mesh Geometry.
virtual void loadDemoData()
Definition: LoaderTR2.cpp:1246
virtual void loadBoxesOverlapsZones()
Definition: LoaderTR2.cpp:1021
virtual void loadFloorData()
Definition: LoaderTR2.cpp:465
Definition: Loader.h:17
virtual void loadExternalSoundFile(std::string f)
Definition: LoaderTR2.cpp:1148