Lab 01: Drawing Shapes
Provided Files
β lab01.c
Files to Edit/Add
β lab01.c
β Your Makefile
Instructions
In this lab, you will be completing TODOs to finish writing two functions:
β void setPixel(int col, int row, unsigned short color)
β Fills the pixel at the specified col and row with the specified color
β void drawTriangle(int col, int row)
β Draws a triangle at the specified column and row
β void drawRect(int col, int row)
β Draws a rectangle at the specified column and row
After writing the two functions, call the drawTriangle function two times and call the drawRect function one time in your main function, with different parameters. The output of your program should look something like the following.
Tips
β For-loops are really great for drawing lines
β The GBA screen size is 240 pixels wide and 160 pixels tall
β If you add parameters to your drawTriangle function, you must change its prototype
β If you add parameters to your drawRect function, you must change its prototype
Submission Instructions
Zip up your entire project folder, including all source files, the Makefile, and everything produced during compilation ( including the .gba file). Submit this zip on Canvas. Name your submission Lab01_FirstameLastname, for example:βLab01_GeorgeBurdell.zipβ.




