sprite test
[retrocrawl] / tools / conv_sprite.c
index ff50a6a..c545584 100644 (file)
@@ -48,14 +48,14 @@ static void conv_sprite(int slice, unsigned char *img, int width, int height, in
        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 */