All pastes #2087239 Raw Edit

Stuff

public text v1 · immutable
#2087239 ·published 2011-10-06 00:29 UTC
rendered paste body
#include "stdafx.h"

void create_flag(FILE *file, int flag_color1_r, int flag1_color1_g, int flag_color1_b, 
	int flag_color2_r, int flag_color2_g, int flag_color2_b, int flag_color3_r, 
	int flag_color3_g, int flag_color3_b);

int _tmain(int argc, _TCHAR* argv[])
{
	printf("Creating flag for Lithuania!\n");
	FILE *lithp = fopen("lithuania.ppm", "wb");	
	create_flag(lithp, 253, 185, 19, 0, 106, 68, 193, 39, 45);
	printf("Flag Complete!\n");
	fclose(lithp);
/*
	printf("Creating flag for France!\n");
	FILE *franp = fopen("france.ppm", "wb");

	printf("Flag Complete!\n");
	fclose(franp);
	*/
	printf("Creating flag for Germany!\n");
	FILE *germp = fopen("germany.ppm", "wb");
	create_flag(germp, 0, 0, 0, 221, 0, 0, 255, 206, 0);
	printf("Flag Complete!\n");
	fclose(germp);


	return 0;
}

void create_flag(FILE *file, int flag_color1_r, int flag1_color1_g, int flag_color1_b, 
	int flag_color2_r, int flag_color2_g, int flag_color2_b, int flag_color3_r, 
	int flag_color3_g, int flag_color3_b)
{
	int height = 600;
	int width = 900;

	int i, j;

	fprintf(file, "P6\n%d, %d\n255\n", width, height);

	for(j = 0; j < height / 3; j++)
	{
		for(i = 0; i < width; i++)
		{
			
		}
	}
}