MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / DrawPixels_8

Method DrawPixels_8

Source/Amiga/Graphics_Amiga.cpp:1476–1496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1474}
1475
1476void cGraphics_Amiga::DrawPixels_8(uint8* pSource, uint8* pDestination) {
1477 uint8 Planes[8];
1478
1479 // Load bits for all planes
1480 for (uint8 Plane = 0; Plane < mBMHD_Current->mPlanes; ++Plane)
1481 Planes[Plane] = *(pSource + ((mBMHD_Current->mHeight * 40) * Plane));
1482
1483 // Loop each pixel
1484 for (uint8 X = 0; X < 8; ++X) {
1485 uint16 Bit = (0x80 >> X);
1486 uint8 Result = 0;
1487
1488 // Value for each plane
1489 for (uint8 Plane = 0; Plane < mBMHD_Current->mPlanes; ++Plane) {
1490 Result |= Planes[Plane] & Bit ? (1 << Plane) : 0;
1491 }
1492
1493 if (Result)
1494 pDestination[X] = mFodder->mVideo_Draw_PaletteIndex | Result;
1495 }
1496}
1497
1498void cGraphics_Amiga::DrawPixels_16(uint8* pSource, uint8* pDestination, const uint8 pPalleteIndex) {
1499 uint16 Planes[8];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected