Fixed pixel format conversion from A8 to RGB5A1

Former-commit-id: ae5dbe7dd41f5b2856661820bf40ae93e3556c36
This commit is contained in:
Lynix 2014-12-10 14:41:43 +01:00
parent db0bbd5be4
commit 3a5868b915
1 changed files with 3 additions and 3 deletions

View File

@ -87,9 +87,9 @@ namespace
nzUInt16* ptr = reinterpret_cast<nzUInt16*>(dst); nzUInt16* ptr = reinterpret_cast<nzUInt16*>(dst);
while (start < end) while (start < end)
{ {
*ptr = (static_cast<nzUInt16>(c8to5(start[2])) << 11) | *ptr = (static_cast<nzUInt16>(0x1F) << 11) |
(static_cast<nzUInt16>(c8to5(start[1])) << 6) | (static_cast<nzUInt16>(0x1F) << 6) |
(static_cast<nzUInt16>(c8to5(start[0])) << 1) | (static_cast<nzUInt16>(0x1F) << 1) |
((*start > 0xF) ? 1 : 0); // > 128 ((*start > 0xF) ? 1 : 0); // > 128
#ifdef NAZARA_BIG_ENDIAN #ifdef NAZARA_BIG_ENDIAN