.pio/libdeps/m5stack-core2/M5Core2/src/utility/Sprite.cpp
/***************************************************************************************
** Function name:           pushSprite
** Description:             Push the sprite to the TFT at x, y with transparent colour
*************************************************************************************x*/
Function name:           pushSprite
Description:             Push the sprite to the TFT at x, y with transparent colour
x
Function name : pushSprite Description : Push the sprite to the TFT at x y with transparent colour x
void TFT_eSprite::pushSprite(int32_t x, int32_t y, uint16_t transp)
{
  if (!_created) return;
  if (_bpp == 16)
  {
    bool oldSwapBytes = _tft->getSwapBytes();
    _tft->setSwapBytes(false);
    _tft->pushImage(x, y, _iwidth, _iheight, _img, transp );
    _tft->setSwapBytes(oldSwapBytes);
  }
  else if (_bpp == 8)
  {
    transp = (uint8_t)((transp & 0xE000)>>8 | (transp & 0x0700)>>6 | (transp & 0x0018)>>3);
    _tft->pushImage(x, y, _dwidth, _dheight, _img8, (uint8_t)transp, (bool)true);
  }
  else _tft->pushImage(x, y, _dwidth, _dheight, _img8, 0, (bool)false);
}
void TFT_eSprite :: pushSprite ( int32_t x , int32_t y , uint16_t transp ) { if ( ! _created ) return ; if ( _bpp == 16 ) { bool oldSwapBytes = _tft -> getSwapBytes ( ) ; _tft -> setSwapBytes ( false ) ; _tft -> pushImage ( x , y , _iwidth , _iheight , _img , transp ) ; _tft -> setSwapBytes ( oldSwapBytes ) ; } else if ( _bpp == 8 ) { transp = ( uint8_t ) ( ( transp & 0xE000 ) >> 8 | ( transp & 0x0700 ) >> 6 | ( transp & 0x0018 ) >> 3 ) ; _tft -> pushImage ( x , y , _dwidth , _dheight , _img8 , ( uint8_t ) transp , ( bool ) true ) ; } else _tft -> pushImage ( x , y , _dwidth , _dheight , _img8 , 0 , ( bool ) false ) ; }
Function name:           pushSprite
Description:             Push the sprite to the TFT at x, y with transparent colour
x
Function name : pushSprite Description : Push the sprite to the TFT at x y with transparent colour x