for(i=0; i<2; i++) {
printf("\n\t.global spr%d%c\n", slice, i == 0 ? 'a' : 'b');
printf("spr%d%c:\n", slice, i == 0 ? 'a' : 'b');
- printf("\t.short 0\n"); /* position x/y */
- printf("\t.short 0\n"); /* vstop */
+ printf("\t.short 0, 0\n"); /* position x/y, vstop */
sprdata = malloc(height * 2 * sizeof *sprdata);
conv_img_data(i, sprdata, img, width, height, pitch);
for(j=0; j<height; j++) {
- printf("\t.short 0x%x\n", (unsigned int)sprdata[j]);
+ printf("\t.short 0x%x, 0x%x\n", (unsigned int)sprdata[j * 2],
+ (unsigned int)sprdata[j * 2 + 1]);
}
printf("\t.long 0\n"); /* end of sprite CW */