Commit to save work
authorLukas Myers <lukaskrickl@gmail.com>
Tue, 16 Jan 2018 15:02:48 +0000 (16:02 +0100)
committerLukas Myers <lukaskrickl@gmail.com>
Tue, 16 Jan 2018 15:02:48 +0000 (16:02 +0100)
main.asm

index 46a7dbd43626571bba209374bd15922bb666d70a..f4625ef19be3be592ebae3c42ed5e1c2ec7e040f 100644 (file)
--- a/main.asm
+++ b/main.asm
@@ -222,20 +222,12 @@ DoDrawGrp0 ;
        sta GRP0 ; update player0 to draw turtle
 
        ; draw playfield
-       tya ; transfer y to a
-       ldy Temp ; load y with map counter
-       sta Temp ; store y for now
-
        lda (MapPtr0),y ; playfiled pattern test
        sta PF0
        lda (MapPtr1),y ; playfiled pattern test
        sta PF1
        lda (MapPtr2),y ; playfiled pattern test
        sta PF2
-       iny ; increment y
-       lda Temp ; load back old y
-       sty Temp ; store new map counter
-       tay ; and transfer it back
 
        ; precalculate date for next line
        lda #TURTLEHEIGHT-1 ; height of gfx
@@ -249,6 +241,14 @@ DoDrawGrp1
        ; start of line 2 of the 2LK
        sta GRP1
 
+       ; draw playfield
+       lda (MapPtr0),y ; playfiled pattern test
+       sta PF0
+       lda (MapPtr1),y ; playfiled pattern test
+       sta PF1
+       lda (MapPtr2),y ; playfiled pattern test
+       sta PF2
+
        dey ; decrease the loop counter
        bne pfLoop ; branch if more left to draw