void BIOS::LCD::GetImage(const CRect &rcRect, ui16 *pBuffer) { ui32 *pBuf = (ui32 *)DEVICE->GetBuffer(); int x1 = rcRect.left, x2 = rcRect.right, y1 = rcRect.top, y2 = rcRect.bottom; for (int x = x1; x < x2; x++) for (int y = y2 - 1; y >= y1; y--) { *pBuffer++ = FROM_RGB_TO_565(pBuf[y * CDevice::Width + x]); } }
/*static*/ void BIOS::LCD::GetImage(const CRect& rcRect, ui16* pBuffer ) { DWORD *pBuf = (DWORD*)DEVICE->display.GetBuffer(); int x1=rcRect.left, x2=rcRect.right, y1=rcRect.top, y2=rcRect.bottom; for (int x=x1; x<x2; x++) for (int y=y2-1; y>=y1; y--) { *pBuffer++ = FROM_RGB_TO_565( pBuf[y*CFrameBuffer::Width+x] ); } }
ui16 BIOS::LCD::GetPixel(int x, int y) { ui32 *pBuf = (ui32 *)DEVICE->GetBuffer(); return FROM_RGB_TO_565(pBuf[y * CDevice::Width + x]); }
/*static*/ ui16 BIOS::LCD::GetPixel(int x, int y) { DWORD *pBuf = (DWORD*)DEVICE->display.GetBuffer(); return FROM_RGB_TO_565( pBuf[y*CFrameBuffer::Width+x] ); }