simplify code

This commit is contained in:
Paweł Kołodziejski 2012-01-27 17:28:56 +01:00
parent 3bbf327cdd
commit c9eb66b853

View File

@ -606,7 +606,7 @@ void GfxOpenGL::createBitmap(BitmapData *bitmap) {
for (int pic = 0; pic < bitmap->_numImages; pic++) {
uint16 *zbufPtr = reinterpret_cast<uint16 *>(bitmap->getImageData(pic).getRawBuffer());
for (int i = 0; i < (bitmap->_width * bitmap->_height); i++) {
uint16 val = READ_LE_UINT16(bitmap->getImageData(pic).getRawBuffer() + 2 * i);
uint16 val = READ_LE_UINT16(zbufPtr + i);
// fix the value if it is incorrectly set to the bitmap transparency color
if (val == 0xf81f) {
val = 0;