CLEAR ALL
BACKGROUND CLUT("C64",6)
BITMAP 1 LOAD "Balloon.bmp"
TARGET BITMAP 1
SWAP PIXELS RGB(0,0,0),0
BITMAP 2 LOAD "BalloonHD.png" RESCALE 128,128
SPRITE 1 BIND BITMAP 1 SHOW ANCHOR 0,0 SCALE 4,4 XYSTEP 4,4 TINT CLUT("C64",14)
PRINT LINE CENTER "Press space bar to toggle HD, or Esc to quit."
f=0:x=0:y=0
DO
    b=TIME
    IF f=0 THEN
        SPRITE 1 MOVE x,y
    ELSE
        SPRITE 1 MOVE x-8,y-8
    END IF
    x=x+1:IF x>200 THEN x=0
    y=y+1:IF y>200 THEN y=0
    PAUSE
    a$=INKEY$
    IF a$=" " THEN
        IF f<>0 THEN
            BACKGROUND CLUT("C64",6)
            SPRITE 1 BIND BITMAP 1 SCALE 4,4
        ELSE
            BACKGROUND $FFCC6633
            SPRITE 1 BIND BITMAP 2 SCALE 1,1
        END IF
        f=NOT f
    ELSE IF a$<>"" THEN
        EXIT DO
    END IF
LOOP
