Part of my program is various ways of clearing the screen. Will these work?
Code:
Code:
;################
;Moves to the next slide
;Data Format:
;Byte 1= Fade-out style, 0= simple, 1= left to right, 2= right to left
3= top to bottom, 4= bottom to top
NextSlide:
push hl
inc hl
ld a,(hl)
cp 0
jr z,simplefade
cp 1
jr z,ltrfade
cp 2
jr z,rtlfade
cp 3
jr z,ttbfade
cp 4
jr z,bttfade
simplefade: ;just clear screen
b_call(_ClrLCDFull)
jp RenderLoop
ltrfade: ;left to right fade out
ld hl,gbuf
ld a,$00
ld c,95
eraserowloop:
push hl
call iFastCopy
ld b,63
erasecolloop:
ld (hl),a
add hl,96
dec b
jr nz,erasecolloop
pop hl
inc hl
dec c
jr nz,eraserowloop
jp RenderLoop
rtlfade: ;right to left fade out
ld hl,gbuf+95
ld a,$00
ld c,95
eraserowloop2:
push hl
call iFastCopy
ld b,63
erasecolloop2:
ld (hl),a
add hl,96
dec b
jr nz,erasecolloop2
pop hl
dec hl
dec c
jr nz,eraserowloop2
jp RenderLoop
ttbfade: ;top to bottom fade out
ld hl,gbuf
ld a,$00
ld c,63
erasecolloop3:
push hl
call iFastCopy
ld b,95
eraserowloop3:
ld (hl),a
inc hl
dec b
jr nz,eraserowloop3
pop hl
add hl,96
dec c
jr nz,erasecolloop3
jp RenderLoop
bttfade: ;bottom to top fade out
ld hl,gbuf+last row first column
ld a,$00
ld c,63
erasecolloop4:
push hl
call iFastCopy
ld b,95
eraserowloop4:
ld (hl),a
inc hl
dec b
jr nz,eraserowloop3
pop hl
push bc
ld c,96
ld b,0
sbc hl,bc
pop bc
dec c
jr nz,erasecolloop3
jp RenderLoop