|
@@ -12,6 +12,7 @@
|
12
|
12
|
#include "global.h"
|
13
|
13
|
#include "Log.h"
|
14
|
14
|
#include "Mesh.h"
|
|
15
|
+#include "Room.h"
|
15
|
16
|
#include "TextureManager.h"
|
16
|
17
|
#include "utils/pixel.h"
|
17
|
18
|
#include "loader/LoaderTR2.h"
|
|
@@ -103,28 +104,28 @@ void LoaderTR2::loadRooms() {
|
103
|
104
|
uint32_t dataToFollow = file.readU32();
|
104
|
105
|
|
105
|
106
|
|
106
|
|
- std::vector<struct vertex> vertices;
|
|
107
|
+ std::vector<struct vertex_t> vertices;
|
107
|
108
|
|
108
|
109
|
uint16_t numVertices = file.readU16();
|
109
|
110
|
for (unsigned int v = 0; v < numVertices; v++) {
|
110
|
|
- struct vertex v;
|
|
111
|
+ struct vertex_t vert;
|
111
|
112
|
// Vertex coordinates, relative to x/zOffset
|
112
|
|
- v.x = file.read16();
|
113
|
|
- v.y = file.read16();
|
114
|
|
- v.z = file.read16();
|
|
113
|
+ vert.x = file.read16();
|
|
114
|
+ vert.y = file.read16();
|
|
115
|
+ vert.z = file.read16();
|
115
|
116
|
|
116
|
|
- v.light1 = file.read16();
|
|
117
|
+ vert.light1 = file.read16();
|
117
|
118
|
|
118
|
119
|
// Set of flags for special rendering effects
|
119
|
120
|
// 0x8000 - Something to do with water surface?
|
120
|
121
|
// 0x4000 - Underwater lighting modulation/movement if seen from above
|
121
|
122
|
// 0x2000 - Water/Quicksand surface movement
|
122
|
123
|
// 0x0010 - Normal?
|
123
|
|
- v.attributes = file.readU16();
|
|
124
|
+ vert.attributes = file.readU16();
|
124
|
125
|
|
125
|
|
- v.light2 = file.read16(); // Almost always equal to light1
|
|
126
|
+ vert.light2 = file.read16(); // Almost always equal to light1
|
126
|
127
|
|
127
|
|
- vertices.push_back(v);
|
|
128
|
+ vertices.push_back(vert);
|
128
|
129
|
}
|
129
|
130
|
|
130
|
131
|
Room* room = new Room();
|