I tried what lord_mike posted since it's probably a better way than what I figured out, but I couldn't get it to work right, so I just fixed it using what I can understand. This seems to scroll up and down without a problem:
tz1_2008y_05m_13d_0533t_fixed.bin 8K
40 downloads
tz1_2008y_05m_13d_0533t_fixed.bas 7.78K
29 downloads
I took out the two barriers you had on the screen so I could move the guy around easier. I added the variable
P since it seemed to be free, changed your color code a bit, and added two subroutines. Here are the lines that I changed:
Added
p=3:
s = 50 : t = 0 : a = 10 : d = 1 : e = 2 : b = 0 : p=3
These lines were deleted:
if c = 8 then gosub colors1
if c = 16 then gosub colors2
if c = 24 then gosub colors3
if c = 24 then c = 0
if g = 1 then gosub colors1
if g = 9 then gosub colors3
if g = 17 then gosub colors2
if g = 24 then g = 0
I added
gosub cscroll and
gosub gscroll:
if w > 0 && player0y > 48 then g = 0 : w = w + 1 : c = c + 1 : gosub cscroll : pfscroll up : player0y = player0y - 2 : goto main
if w > 0 && player0y < 48 then c = 0 : t = 0 : w = w + 1 : g = g + 1 : gosub gscroll : pfscroll down : goto main
New subroutines:
cscroll
if playfieldpos=1 then p=p-1 : if p<1 then p=3
if playfieldpos=1 then on p goto colors1 colors1 colors2 colors3
return
gscroll
if playfieldpos=8 then p=p+1 : if p>3 then p=1
if playfieldpos=8 then on p goto colors1 colors1 colors2 colors3
return
Adjusted the colors:
colors1
pfcolors:
228
40
42
228
40
42
228
40
42
228
40
42
end
return
colors2
pfcolors:
42
228
40
42
228
40
42
228
40
42
228
40
end
return
colors3
pfcolors:
40
42
228
40
42
228
40
42
228
40
42
228
end
return