@kayahr/wastelib
    Preparing search index...

    Class EndingPatch

    Image update patch.

    Index

    Methods

    • Returns the RGBA color at the specified position.

      Parameters

      • x: number

        The horizontal pixel position.

      Returns number

      The RGBA color at the specified position.

    • Returns the patch data to apply to the image. Always four bytes with eight 4-bit colors.

      Returns number[]

      The patch data.

    • Returns the byte offset in the image data array to update.

      Returns number

      The byte offset in the image data array to update.

    • 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.

    • The horizontal update position in pixels relative to the image.

      Returns number

      The horizontal update position.

    • The vertical update position in pixels relative to the image.

      Returns number

      The vertical update position.

    • 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 null | EndingPatch

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