Core/burn/load.cpp
// Separate out a bitfield into Bit number 'nField' of each nibble in pDest
// (end result: each dword in memory carries the 8 pixels of a tile line).
Separate out a bitfield into Bit number 'nField' of each nibble in pDest
(end result: each dword in memory carries the 8 pixels of a tile line).
Separate out a bitfield into Bit number ' nField ' of each nibble in pDest ( end result : each dword in memory carries the 8 pixels of a tile line ) .
INT32 BurnLoadBitField(UINT8 *pDest, UINT8 *pSrc, INT32 nField, INT32 nSrcLen)
{
  INT32 nPix=0;
  for (nPix=0; nPix<(nSrcLen<<3); nPix++)
  {
    INT32 nBit;
    nBit=(*pSrc)>>(7-(nPix&7)); nBit&=1;
    nBit<<=nField; 
    if ((nPix&1)==1) nBit<<=4; 
    *pDest|=nBit; 
    if ((nPix&1)==1) pDest++;
    if ((nPix&7)==7) pSrc++;
  }
  return 0;
}
INT32 BurnLoadBitField ( UINT8 * pDest , UINT8 * pSrc , INT32 nField , INT32 nSrcLen ) { INT32 nPix = 0 ; for ( nPix = 0 ; nPix < ( nSrcLen << 3 ) ; nPix ++ ) { INT32 nBit ; nBit = ( * pSrc ) >> ( 7 - ( nPix & 7 ) ) ; nBit &= 1 ; nBit <<= nField ; if ( ( nPix & 1 ) == 1 ) nBit <<= 4 ; * pDest |= nBit ; if ( ( nPix & 1 ) == 1 ) pDest ++ ; if ( ( nPix & 7 ) == 7 ) pSrc ++ ; } return 0 ; }
Separate out a bitfield into Bit number 'nField' of each nibble in pDest
(end result: each dword in memory carries the 8 pixels of a tile line).
Separate out a bitfield into Bit number ' nField ' of each nibble in pDest ( end result : each dword in memory carries the 8 pixels of a tile line ) .
// Get the bitplane pixel value (on or off) // Move to correct bit for this field // use low nibble for each even pixel // use high nibble for each odd pixel // OR into destination