mktex.c 1.59 KB
#include <stdio.h>

int main()
{
    int		i, j;
    unsigned short	stmp;

    printf("static Gfx map_C_dummy_aligner1[] = { gsSPEndDisplayList() };\n\n");

    printf("unsigned short map[] = {\n");
    
    for (j = 0; j < 40; j++ ) {
    
        /* red ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = i<<11;
    	    printf(" 0x%x,",stmp);
        }
    
        /* green ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = i<<6;
    	    printf(" 0x%x,",stmp);
        }
    
        /* blue ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = i<<1;
    	    printf(" 0x%x,",stmp);
        }
    
        /* yellow ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = (i<<11)|(i<<6);
    	    printf(" 0x%x,",stmp);
        }
    
        /* cyan ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = (i<<6)|(i<<1);
    	    printf(" 0x%x,",stmp);
        }
    
        /* magenta ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = (i<<11)|(i<<1);
    	    printf(" 0x%x,",stmp);
        }
    
        /* cyan ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = (i<<6)|(i<<1);
    	    printf(" 0x%x,",stmp);
        }
    
        /* yellow ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = (i<<11)|(i<<6);
    	    printf(" 0x%x,",stmp);
        }
    
        /* blue ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = i<<1;
    	    printf(" 0x%x,",stmp);
        }

        /* green ramp */
        for (i = 28; i < 32; i++) {
    	    stmp = i<<6;
    	    printf(" 0x%x,",stmp);
        }
    
    }
    printf("\n};\n");

    return 0;
}