// Example of inline kickasm resource data

const byte* SPRITE = $0c00;
kickasm(pc SPRITE, resource "balloon.png") {{
    .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
    .for (var y=0; y<21; y++)
        .for (var x=0;x<3; x++)
            .byte pic.getSinglecolorByte(x,y)
}}

const byte* SCREEN= $400;
const byte* SPRITES_ENABLE = $d015;
const byte* SPRITES_XPOS = $d000;
const byte* SPRITES_YPOS = $d001;

void main() {
    *(SCREEN+$3f8) = (byte)((word)SPRITE/$40);
    *SPRITES_ENABLE = 1;
    *SPRITES_XPOS = 100;
    *SPRITES_YPOS = 100;
}
