Optimization: don't have to inx in sprite code, can hardcode the increase in the array position

This commit is contained in:
Rob McMullen 2017-07-02 21:54:04 -07:00
parent d748e2b737
commit 89db8f6406
1 changed files with 3 additions and 4 deletions

View File

@ -437,12 +437,11 @@ class Sprite(Listing):
self.asm("ldx PARAM1")
cycles = 3
else:
self.asm("inx")
cycles = 2
self.asm("lda HGRROWS_H1,x")
cycles = 0
self.asm("lda HGRROWS_H1+%d,x" % row)
cycles += 4
self.asm("sta SCRATCH1")
self.asm("lda HGRROWS_L,x")
self.asm("lda HGRROWS_L+%d,x" % row)
self.asm("sta SCRATCH0")
if row == 0:
self.asm("ldy PARAM0")