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

Method DrawPixels_16

Source/Amiga/Graphics_Amiga.cpp:1498–1518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1496}
1497
1498void cGraphics_Amiga::DrawPixels_16(uint8* pSource, uint8* pDestination, const uint8 pPalleteIndex) {
1499 uint16 Planes[8];
1500
1501 // Load bits for all planes
1502 for (uint8 Plane = 0; Plane < mBMHD_Current->mPlanes; ++Plane)
1503 Planes[Plane] = readBEWord(pSource + ((mBMHD_Current->mHeight * 40) * Plane));
1504
1505 // Loop each pixel
1506 for (uint8 X = 0; X < 16; ++X) {
1507 uint16 Bit = (0x8000 >> X);
1508 uint8 Result = 0;
1509
1510 // Value for each plane
1511 for (uint8 Plane = 0; Plane < mBMHD_Current->mPlanes; ++Plane) {
1512 Result |= Planes[Plane] & Bit ? (1 << Plane) : 0;
1513 }
1514
1515 if (Result)
1516 pDestination[X] = pPalleteIndex | Result;
1517 }
1518}
1519
1520void cGraphics_Amiga::Mission_Intro_Play(
1521 const bool pShowHelicopter, const eTileTypes pTileset,

Callers

nothing calls this directly

Calls 1

readBEWordFunction · 0.85

Tested by

no test coverage detected