Jonny
Well-known member
Is there any speed advantage to storing temp values in this situation... or will both run exactly the same?
Before...
After...
Is there a better way to do this? It's for my HUD which will be displayed during gameplay.
Before...
Code:
DrawSprite #010, #208, #$54, #%00000000 ;; TOP ;;
DrawSprite #048, #208, #$54, #%01000000
DrawSprite #111, #208, #$54, #%00000000
DrawSprite #137, #208, #$54, #%01000000
DrawSprite #200, #208, #$54, #%00000000
DrawSprite #238, #208, #$54, #%01000000
DrawSprite #010, #224, #$54, #%10000000 ;; BOTTOM ;;
DrawSprite #048, #224, #$54, #%11000000
DrawSprite #111, #224, #$54, #%10000000
DrawSprite #137, #224, #$54, #%11000000
DrawSprite #200, #224, #$54, #%10000000
DrawSprite #238, #224, #$54, #%11000000
After...
Code:
LDA #$54
STA tempA
LDA #208
STA tempB
LDA #224
STA tempC
DrawSprite #010, tempB, tempA, #%00000000 ;; TOP ;;
DrawSprite #048, tempB, tempA, #%01000000
DrawSprite #111, tempB, tempA, #%00000000
DrawSprite #137, tempB, tempA, #%01000000
DrawSprite #200, tempB, tempA, #%00000000
DrawSprite #238, tempB, tempA, #%01000000
DrawSprite #010, tempC, tempA, #%10000000 ;; BOTTOM ;;
DrawSprite #048, tempC, tempA, #%11000000
DrawSprite #111, tempC, tempA, #%10000000
DrawSprite #137, tempC, tempA, #%11000000
DrawSprite #200, tempC, tempA, #%10000000
DrawSprite #238, tempC, tempA, #%11000000
Is there a better way to do this? It's for my HUD which will be displayed during gameplay.