For this homework assignment, we will be implementing the 2D rendering functions of a simple game.
You will need to download this game project: Bejeweled.zip (updated 1/16). In it you will find a file called "Homework.cpp" with three drawing functions whose bodies are empty.
The assignment is to correctly implement those functions:
DrawTexturedOpaqueRectangle - Given two opposite corners of a rectangle, defined by (x0,y0) and (x1,y1), and a texture,
this function must draw the texture within the rectangle. The coordinates are given in pixels.
DrawSpriteRectangle - This is the same as DrawTexturedOpaqueRectangle,
except that the alpha channel of the texture must be used for opacity.
DrawRotatedSpriteRectangle - This is the same as DrawSpriteRectangle,
except that the rectangle must be rotated around its center by an angle a given in radians.
You must send to JCAB your completed Homework.cpp file according to the instructions.
Extra grade will help you compensate your grade if you don't manage to successfully complete one or more basic assignments.
For extra grade, you can add some meaningful 2D graphics to your game project, rendered in a manner similar to the basic assignment.
There are several possible things you may want to draw. One possible suggestion is a health bar or scoring element of some kind.
Another posibility is adding a simple minimap to your game project. Following are suggestions on how to design such a minimap:
One example of what this might look like:

Two possible strategies for implementing the minimap are:
Make a fan of triangles arranged in a circular shape. Each vertex will have texture coordinates according to what part of the map should be visible at its location.
Instead of using a triangle fan to represent the circle, you could render the map as a simple sprite, centered on and rotated around the player position. You can then use a second texture's alpha channel to "cut out" the part of the minimap that we want visible. This mask texture would contain a circular shape in its alpha channel, and would be sampled with a second set of texture coordinates.
You must send to JCAB your entire game project according to the instructions. You should use the CleanBeforeZipping.bat file instead of the one Dan Chang provided, because I also require that you don't deliver the generated directories (Debug, Release, etc.)
[an error occurred while processing this directive]Basic assignment: download here.
Extra credit: download here. Or access subversion repository: http://uw.thejcab.com/UWGame2011/
The meat of the extra credit solution is in the new source file, Minimap.cpp. Examine the file as it's commented to explain what it's doing.