;哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪
;I think I've found a slightly faster way for ZCP. I used it in my game
;XC-1701(should be on the ZShell-homepage soon). I've only temporary access
;to the internet(that's over school). So if you find it faster, if you
;even can make it faster, or if there's already a faster version, please
;send me a letter:
; Andreas Ess
; Tufers 156
; A-6811 Goefis
; Austria/Europe
;
; Thank you, Andreas
;哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪

;-----------------------------------------------------------------------------
;ShowZCP: shows in HL stored picture
;-----------------------------------------------------------------------------
ShowZCP:
 push    HL
 ROM_CALL(CLEARLCD)
 pop     HL
 ex      DE, HL
 ld      HL, $FC00
 ld      B,128
CLoop:
 inc     DE
 ld      A,(DE)
 cp      $00
 jr      Z,EndDecode
 ld      (Data),A
 bit     7,A
 jr      NZ,Copy
Stream:
 ld      A,(Data)
 and     $3F
 ld      (Count),A
StreamLoop:
 ld      A,(Data)
 bit     6,A
 CALL_NZ(DrwPoint)
 rrc     B
 jr      nc, CBC0
 inc     HL
CBC0:
 ld      A,(Count)
 dec     A
 jr      Z,CLoop
 ld      (Count),A
 jr      StreamLoop
Copy:
 ld      A,$07
 ld      (Count),A
CopyLoop:
 ld      A,(Data)
 rla
 ld      (Data),A
 bit     7,A
 CALL_NZ(DrwPoint)
 rrc     B
 jr      nc, CBC1
 inc     HL
CBC1: 
 ld      A,(Count)
 dec     A
 jr      Z,CLoop
 ld      (Count),A
 jr      CopyLoop
EndDecode:
 ret

DrwPoint:
 ld      A, (HL)
 or      B
 ld      (HL), A
 ret
