Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EndingPatch

Image update patch.

Hierarchy

  • EndingPatch

Index

Methods

getColor

  • getColor(x: number): number
  • Returns the RGBA color at the specified position.

    Parameters

    • x: number

      The horizontal pixel position.

    Returns number

    The RGBA color at the specified position.

getData

  • getData(): number[]
  • Returns the patch data to apply to the image. Always four bytes with eight 4-bit colors.

    Returns number[]

    The patch data.

getOffset

  • getOffset(): number
  • Returns the byte offset in the image data array to update.

    Returns number

    The byte offset in the image data array to update.

getRawOffset

  • getRawOffset(): number
  • Returns the raw offset to update. This is the raw offset value from the END.CPA file measured in 8 byte blocks relative to a 320 pixels wide screen. Too complex to use. So it's recommended to use the getX() and getY() methods which converts this offset into pixel coordinates relative to the image. Or use the getOffset() method which returns the offset byte address in the image data.

    Returns number

    The raw image update offset.

getX

  • getX(): number
  • The horizontal update position in pixels relative to the image.

    Returns number

    The horizontal update position.

getY

  • getY(): number
  • The vertical update position in pixels relative to the image.

    Returns number

    The vertical update position.

Static read

  • Reads an update patch from the given reader. If end of animation update block is reached then null is returned.

    Parameters

    • reader: BinaryReader

      The reader to read the update patch from.

    Returns EndingPatch | null

    The read update patch or null if end of update block is reached.

Generated using TypeDoc