TxSprite constructor

TxSprite({
  1. required int msgCode,
  2. required int width,
  3. required int height,
  4. required int numColors,
  5. required Uint8List paletteData,
  6. required Uint8List pixelData,
})

Create a sprite with the specified size, palette data and pixel data, identified by the specified message code (the identifier used on the Lua side to label this sprite) width(Uint16), height(Uint16), bpp(Uint8), numColors(Uint8), palette (Uint8 r, Uint8 g, Uint8 b)*numColors, data (length: width x height bytes content: palette index)

Implementation

TxSprite(
    {required super.msgCode,
    required int width,
    required int height,
    required int numColors,
    required Uint8List paletteData,
    required Uint8List pixelData})
    : _width = width,
      _height = height,
      _numColors = numColors,
      _paletteData = paletteData,
      _pixelData = pixelData;