// Note: Set CenterY and CenterY to the vertical and horizontal position in // the bitmap at which you want the anim to be drawn. PrevLineNum = $FF Y = CenterY - ImageCenterY - Height while not EOF { Read UWORD RowHeader Read UWORD RowOfs if (RowHeader = 0x7FFF) or (RowOfs = 0x7FFF) then Exit RunLength = RowHeader and $FFF LineNum = RowHeader shr 12 Unknown = RowOfs and $3F RowOfs = RowOfs sar 6 X = CenterX + RowOfs if (PrevLineNum <> $FF) and (LineNum <> PrevLineNum) then Y++ PrevLineNum = LineNum if Y >= 0 then { if Y >= MaxHeight then Exit; For I := 0 to RunLength-1 do { Read(B, 1) Row[X+I,Y] = Palette[B] } } Seek(RunLength, FromCurrent) }