// Cameron Scott
// October 25, 2022
// Lab #9A, Section 002
// This program prints a ppm image of the Irish Flag using functions 
// to fill the array with the corresponding colors using multi module 
// programs.

#include "defs.h"

int main (void) {

	header header_t;

	int width;
	int height;

	//Function calls
	width = getWidth();
	height = width / 2;

	header_t = (header) {"P3", width, height, 255};

	fprintf(stderr, "\n\nMaking the flag with width %d & height %d ...", width, height);
	fprintf(stderr, "\n\n");

	writeHeader(header_t);

	pixel colorArray[width * height];

	fillFlagArray(colorArray, header_t.width, header_t.height);
	writePixels(colorArray, header_t.width, header_t.height);

	return 0;

}



