[Sphere-axis-commits] CVS: UOArt UOArtCtl.cpp,1.13,1.14
Brought to you by:
pesterle
From: Philip E. <pes...@us...> - 2002-05-15 20:37:16
|
Update of /cvsroot/sphere-axis/UOArt In directory usw-pr-cvs1:/tmp/cvs-serv3630 Modified Files: UOArtCtl.cpp Log Message: Fixed bug in NPC display where the gfx got garbled if the height of the artwork exceeded the height of the control. Index: UOArtCtl.cpp =================================================================== RCS file: /cvsroot/sphere-axis/UOArt/UOArtCtl.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** UOArtCtl.cpp 15 May 2002 20:05:59 -0000 1.13 --- UOArtCtl.cpp 15 May 2002 20:37:12 -0000 1.14 *************** *** 1162,1190 **** Y++; previousLine = wLineNum; ! if ( Y >= 0 ) { ! for ( int j = 0; j < wRunLength; j++ ) { ! BYTE bIndex = 0; ! memcpy(&bIndex, &bData[dwOffset], 1); ! dwOffset++; ! DWORD dwColor = BlendColors(wPalette[bIndex], m_wAppliedColour, false); { ! BYTE r, g, b; ! b = (BYTE) ((dwColor >> 16) & 0xFF); ! g = (BYTE) ((dwColor >> 8) & 0xFF); ! r = (BYTE) ((dwColor) & 0xFF); ! X = m_xOffset + (bounds.Width() / 2 ) + offset + j; ! if ( X >= 0 && X < bounds.Width() && Y >=0 && Y < bounds.Height() ) ! { ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3), b); ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3) + 1, g); ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3) + 2, r); ! } } } } - else - fData.Seek( wRunLength, CFile::current ); } delete [] frameOffsets; --- 1162,1185 ---- Y++; previousLine = wLineNum; ! for ( int j = 0; j < wRunLength; j++ ) { ! BYTE bIndex = 0; ! memcpy(&bIndex, &bData[dwOffset], 1); ! dwOffset++; ! DWORD dwColor = BlendColors(wPalette[bIndex], m_wAppliedColour, false); { ! BYTE r, g, b; ! b = (BYTE) ((dwColor >> 16) & 0xFF); ! g = (BYTE) ((dwColor >> 8) & 0xFF); ! r = (BYTE) ((dwColor) & 0xFF); ! X = m_xOffset + (bounds.Width() / 2 ) + offset + j; ! if ( X >= 0 && X < bounds.Width() && Y >=0 && Y < bounds.Height() ) { ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3), b); ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3) + 1, g); ! m_bPixels.SetAt((( (bounds.Width() * Y) + X) * 3) + 2, r); } } } } delete [] frameOffsets; |