add bitmap total bytes data in Compress format texture
This commit is contained in:
parent
377cb41841
commit
2a995a4575
@ -96,10 +96,16 @@ bool TextureFileCreater::WriteFileHeader(const OSString &old_filename)
|
|||||||
dos->WriteUint32(image->width());
|
dos->WriteUint32(image->width());
|
||||||
dos->WriteUint32(image->height());
|
dos->WriteUint32(image->height());
|
||||||
|
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TextureFileCreater::Write(void *data)
|
||||||
|
{
|
||||||
if(fmt->format>ColorFormat::COMPRESS)
|
if(fmt->format>ColorFormat::COMPRESS)
|
||||||
{
|
{
|
||||||
dos->WriteUint8(0);
|
dos->WriteUint8(0);
|
||||||
dos->WriteUint16(uint(fmt->format)-uint(ColorFormat::COMPRESS));
|
dos->WriteUint16(uint(fmt->format)-uint(ColorFormat::COMPRESS));
|
||||||
|
dos->WriteUint32(total_bytes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -109,11 +115,6 @@ bool TextureFileCreater::WriteFileHeader(const OSString &old_filename)
|
|||||||
dos->WriteUint8((uint8)fmt->type); //数据类型
|
dos->WriteUint8((uint8)fmt->type); //数据类型
|
||||||
}
|
}
|
||||||
|
|
||||||
return(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TextureFileCreater::Write(void *data)
|
|
||||||
{
|
|
||||||
return(dos->Write(data,total_bytes)==total_bytes);
|
return(dos->Write(data,total_bytes)==total_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user