/* 
    Tenchi Applegate
    10/25/2022
    Lab section 2
    CPSC1011
    Lab 9A
    Gathers width input from the user to create a ppm file with structs 
    using rgb values to create the Ireland flag using arrays and imbedded for loops.
    Using source files and a header file to separate code.
*/

#include "defs.h"

int main () {
    int width;
    int height;

    width = getWidth();
    height = width/2;

    // initalizing structs
    header_t header_info = {"P3", width, height, 255};
    pixels_t pixel_array[width*height];

    fprintf(stderr, "\n\nMaking the flag with width %d & height %d ...", width, height);
    fprintf(stderr, "\n\n");

    // functions
    writeHeader(header_info);
    fillFlagArray(pixel_array, width, height);
    writePixels(pixel_array, width, height);

    return 0;
}