Fixed pixel format conversion from A8 to RGB5A1
Former-commit-id: ae5dbe7dd41f5b2856661820bf40ae93e3556c36
This commit is contained in:
@@ -87,9 +87,9 @@ namespace
|
||||
nzUInt16* ptr = reinterpret_cast<nzUInt16*>(dst);
|
||||
while (start < end)
|
||||
{
|
||||
*ptr = (static_cast<nzUInt16>(c8to5(start[2])) << 11) |
|
||||
(static_cast<nzUInt16>(c8to5(start[1])) << 6) |
|
||||
(static_cast<nzUInt16>(c8to5(start[0])) << 1) |
|
||||
*ptr = (static_cast<nzUInt16>(0x1F) << 11) |
|
||||
(static_cast<nzUInt16>(0x1F) << 6) |
|
||||
(static_cast<nzUInt16>(0x1F) << 1) |
|
||||
((*start > 0xF) ? 1 : 0); // > 128
|
||||
|
||||
#ifdef NAZARA_BIG_ENDIAN
|
||||
|
||||
Reference in New Issue
Block a user