mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 10:40:33 +00:00
The last commit contained a broken version of tgatexture.cpp.
SVN r302 (trunk)
This commit is contained in:
parent
93beb4d42e
commit
e3c5dd4644
1 changed files with 5 additions and 1 deletions
|
@ -92,8 +92,12 @@ FTexture *FTGATexture::Create(FileReader & file, int lumpnum)
|
||||||
TGAHeader hdr;
|
TGAHeader hdr;
|
||||||
file.Seek(0, SEEK_SET);
|
file.Seek(0, SEEK_SET);
|
||||||
file.Read(&hdr, sizeof(hdr));
|
file.Read(&hdr, sizeof(hdr));
|
||||||
|
#ifdef WORDS_BIGENDIAN
|
||||||
|
hdr.width = LittleShort(hdr.width);
|
||||||
|
hdr.height = LittleShort(hdr.height);
|
||||||
|
#endif
|
||||||
|
|
||||||
return new FTGATexture(lumpnum, LittleShort(hdr.width), LittleShort(hdr.height));
|
return new FTGATexture(lumpnum, &hdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue