Fix some endiannes errors.
This commit is contained in:
parent
5943e8f42f
commit
098bc2f905
@ -406,10 +406,14 @@ namespace nv
|
|||||||
s << pf.flags;
|
s << pf.flags;
|
||||||
s << pf.fourcc;
|
s << pf.fourcc;
|
||||||
s << pf.bitcount;
|
s << pf.bitcount;
|
||||||
s << pf.rmask;
|
s.serialize(&pf.rmask, sizeof(pf.rmask));
|
||||||
s << pf.gmask;
|
s.serialize(&pf.gmask, sizeof(pf.gmask));
|
||||||
s << pf.bmask;
|
s.serialize(&pf.bmask, sizeof(pf.bmask));
|
||||||
s << pf.amask;
|
s.serialize(&pf.amask, sizeof(pf.amask));
|
||||||
|
// s << pf.rmask;
|
||||||
|
// s << pf.gmask;
|
||||||
|
// s << pf.bmask;
|
||||||
|
// s << pf.amask;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,7 +449,9 @@ namespace nv
|
|||||||
s << header.pitch;
|
s << header.pitch;
|
||||||
s << header.depth;
|
s << header.depth;
|
||||||
s << header.mipmapcount;
|
s << header.mipmapcount;
|
||||||
s.serialize(header.reserved, 11 * sizeof(uint));
|
for (int i = 0; i < 11; i++) {
|
||||||
|
s << header.reserved[i];
|
||||||
|
}
|
||||||
s << header.pf;
|
s << header.pf;
|
||||||
s << header.caps;
|
s << header.caps;
|
||||||
s << header.notused;
|
s << header.notused;
|
||||||
@ -1043,6 +1049,8 @@ void DirectDrawSurface::readLinearImage(Image * img)
|
|||||||
|
|
||||||
uint byteCount = (header.pf.bitcount + 7) / 8;
|
uint byteCount = (header.pf.bitcount + 7) / 8;
|
||||||
|
|
||||||
|
#pragma message("Support floating point linear images and other FOURCC codes.")
|
||||||
|
|
||||||
// Read linear RGB images.
|
// Read linear RGB images.
|
||||||
for (uint y = 0; y < h; y++)
|
for (uint y = 0; y < h; y++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user