#include <stdio.h>

void write_elt(FILE *f, int i) {
	fprintf(f, "    elt%d\n", i);
	fprintf(f, "    {\n");
	fprintf(f, "      type=angular\n");
	fprintf(f, "      x=700\n");
	fprintf(f, "      y=43\n");
	fprintf(f, "      width=24\n");
	fprintf(f, "      height=24\n");
	fprintf(f, "      image=rpm_needle.tga\n");
	fprintf(f, "      var=rpm\n");
	fprintf(f, "      min_value=%d\n", 400*i);
	fprintf(f, "      max_value=%d\n", 400*i+1);
	fprintf(f, "      min_angle=-3\n");
	fprintf(f, "      max_angle=%d\n", -6*i+3);
	fprintf(f, "      pivot_x=0\n");
	fprintf(f, "      pivot_y=77\n");
	fprintf(f, "    }\n");
}

	
int main() {
	FILE *f = fopen("elt.ini", "wt");
	
	for (int i=0; i<45; i++) {
		write_elt(f, i+1);
	}
	fprintf(f, "\n");
	
	fclose(f);
	return 0;
}
