0 Members and 5 Guests are viewing this topic.
Hmm I'm not sure how to do that without using the back buffer. I think you need to redraw the tiles around the enemies to hide those enemies, scroll, then redraw the enemies. That may be complicated, though. The only other solution is to redraw the tilemapper every frame. You could use another memory location and store a copy of the buffer (before drawing the enemies) there, then when it comes times to scroll, you display that copy on the screen, erasing the enemies in the process, scroll, then display the enemies.
:.TILEMAPR:prgmSERENA:.TILEMAP:[]→GDB0M:det(1024)::.TILES:[]→GDB0T:det(504):GetCalc("vSMBuff",1536)→B::.CREATE TILEMAP:GDB0M-1→D:0→Y:While -32: 0→X: While -32: X+Y→{D+1→D}: X+1→X: End: Y+1→Y:End::.CREATE TILES:Fix 5:ClrDraw:EF0→{L6}r→{L6+12}r:GDB0T-1→D:0→Z→θ-1:While Z*10+θ-63: Fix 3: E0200→{E86D7}r: DrawF Z►Dec: Fix 2: E0204→{E86D7}r: DrawF θ►Dec: 0→Y: While -8: {Y*12+L6}→{D+1→D}: Y+1→Y: End: !If θ+1→θ-10: →θ: Z+1→Z: End:End:Fix 4::.DRAW INITIAL IMAGE:GDB0M-1→D:0→Y:While -64: 0→X: While -96: Pt-Off(X,Y,{D+1→D}*8+GDB0T)r: X+8→X: End: D+20→D: Y+8→Y:End:conj(L6,B,768:conj(L3,B+768,768::.INITIALIZE POSITION VARIABLES:0→X→Y→Z→θ→D:::.MAIN LOOP:FnInt(DG,2):Repeat getKey(15):: .MOVE DOWN: If Y-24: FnOff: If getKey(1) and (D=1:conj(B,L6,768:conj(B+768,L3,768: θ-1→θ: Vertical -: Vertical -r: Y+8*32+X-1+GDB0M→r5: 0→r6: While -104: Pt-Off(r6+Z,θ+64,{r5+1→r5}*8+GDB0T)r: r6+8→r6: End: !If θ+8: →θ: Y+1→Y: End:conj(L6,B,768:conj(L3,B+768,768:sub(SM): End: FnOn: End:: .MOVE LEFT: If X-Z: FnOff: If getKey(2) and (D=2:conj(B,L6,768:conj(B+768,L3,768: Z+1→Z: Horizontal(+: Horizontal(+r: Y-1*32+X+GDB0M→r5: 0→r6: While -72: Pt-Off(Z,r6+θ,{r5+32→r5}*8+GDB0T)r: r6+8→r6: End: !If Z-1: ‾7→Z: X-1→X: End:conj(L6,B,768:conj(L3,B+768,768:sub(SM): End: FnOn: End:: .MOVE RIGHT: If X-20: FnOff: If getKey(3) and (D=3:conj(B,L6,768:conj(B+768,L3,768: Z-1→Z: Horizontal(-: Horizontal(-r: Y-1*32+X+12+GDB0M→r5: 0→r6: While -72: Pt-Off(Z+96,r6+θ,{r5+32→r5}*8+GDB0T)r: r6+8→r6: End: !If Z+8: →Z: X+1→X: End:conj(L6,B,768:conj(L3,B+768,768:sub(SM): End: FnOn: End:: .MOVE UP: If Y-θ: FnOff: If getKey(4) and (D=4:conj(B,L6,768:conj(B+768,L3,768: θ+1→θ: Vertical +: Vertical +r: Y*32+X-1+GDB0M→r5: 0→r6: While -104: Pt-Off(r6+Z,θ,{r5+1→r5}*8+GDB0T)r: r6+8→r6: End: !If θ-1: ‾7→θ: Y-1→Y: End:conj(L6,B,768:conj(L3,B+768,768:sub(SM): End: FnOn: End:0→D:If getKey(1) and (D=0:1→D:End:If getKey(2) and (D=0:2→D:End:If getKey(3) and (D=0:3→D:End:If getKey(4) and (D=0:4→D:End:End:LnReg:Return:: .COPY IMAGE TO SCREEN:Lbl SM:0→D:For(A,12,44:For(C,36,52:Pt-Off(C,A,D+Pic1S:Pt-Off(C,A,D+8+Pic1S)r:D+16→D:C+7→C:End:A+7→A:End:Return::Lbl DG:Normal:DispGraphrr:Full:Return::.VARIABLES:.D=Data pointer:.X=X position in tilemap of top-left corner (0-20):.Y=Y position in tilemap of top-left corner (0-24):.Z=X offset of top-left corner (0-‾7):.θ=Y offset of top-left corner (0-‾7)
Could you clarify what the code does? Does it do the first thing I said, does it do the second or does it do the last?