| 1445 | } |
| 1446 | |
| 1447 | void cGraphics_Amiga::DrawPixel(uint8* pSource, uint8* pDestination, uint16 pSourceX, uint16 pSourceY, uint16 pX, uint16 pY) { |
| 1448 | uint8 Planes[5] = { 0, 0, 0, 0, 0 }; |
| 1449 | |
| 1450 | pSource += (pSourceX / 8); |
| 1451 | pSource += (pSourceY * 40); |
| 1452 | |
| 1453 | pDestination += pX; |
| 1454 | pDestination += pY * mSurface->GetWidth(); |
| 1455 | |
| 1456 | |
| 1457 | // Load bits for all planes |
| 1458 | for (uint8 Plane = 0; Plane < mBMHD_Current->mPlanes; ++Plane) |
| 1459 | Planes[Plane] = *(pSource + ((mBMHD_Current->mHeight * 40) * Plane)); |
| 1460 | |
| 1461 | // Loop each pixel |
| 1462 | |
| 1463 | uint8 Bit = (0x80 >> (pSourceX % 8)); |
| 1464 | uint8 Result = 0; |
| 1465 | |
| 1466 | // Value for each plane |
| 1467 | for (uint8 Plane = 0; Plane < mBMHD_Current->mPlanes; ++Plane) { |
| 1468 | Result |= Planes[Plane] & Bit ? (1 << Plane) : 0; |
| 1469 | } |
| 1470 | |
| 1471 | if (Result) |
| 1472 | *pDestination = mFodder->mVideo_Draw_PaletteIndex | Result; |
| 1473 | |
| 1474 | } |
| 1475 | |
| 1476 | void cGraphics_Amiga::DrawPixels_8(uint8* pSource, uint8* pDestination) { |
| 1477 | uint8 Planes[8]; |