File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ GeometryPtr LoaderDFF::readGeometry(const RWBStream &stream) {
176
176
std::vector<GeometryVertex> verts;
177
177
verts.resize (numVerts);
178
178
179
- if (geomStream.getChunkVersion () < 0x1003FFFF ) {
179
+ if (geomStream.getChunkVersion () < 0x34003 ) {
180
180
headerPtr += sizeof (RW::BSGeometryColor);
181
181
}
182
182
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class RWBStream {
24
24
std::ptrdiff_t _size;
25
25
char * _dataCur;
26
26
char * _nextChunk;
27
- std::uint32_t _chunkVersion ;
27
+ std::uint32_t _chunkStamp ;
28
28
size_t _currChunkSz;
29
29
30
30
public:
@@ -50,7 +50,7 @@ class RWBStream {
50
50
_currChunkSz = bit_cast<std::uint32_t >(*_dataCur);
51
51
_dataCur += sizeof (std::uint32_t );
52
52
53
- _chunkVersion = bit_cast<std::uint32_t >(*_dataCur);
53
+ _chunkStamp = bit_cast<std::uint32_t >(*_dataCur);
54
54
_dataCur += sizeof (std::uint32_t );
55
55
56
56
_nextChunk = _dataCur + _currChunkSz;
@@ -67,7 +67,10 @@ class RWBStream {
67
67
}
68
68
69
69
std::uint32_t getChunkVersion () const {
70
- return _chunkVersion;
70
+ if (_chunkStamp & 0xFFFF0000 )
71
+ return ((_chunkStamp >> 14 & 0x3FF00 ) + 0x30000 ) |
72
+ (_chunkStamp >> 16 & 0x3F );
73
+ return _chunkStamp << 8 ;
71
74
}
72
75
73
76
/* *
You can’t perform that action at this time.
0 commit comments