/******************************************************************** File: bus.cc Author: Dana Vrajitoru Description: A class handling a bus moving around. Project: A sprite moving through a maze application. Last updated: February 10, 2011. ********************************************************************/ #include #include #include #include "bus.h" // Returns the opposite of a given direction. Direction opposite(Direction w) { switch (w) { case north: return south; case south: return north; case east: return west; case west: return east; } } // Draws a polygon with given array of coordinates, void polygon(GLfloat coords[][2], float offx, float offy, int n) { glBegin(GL_POLYGON); for (int i=0; i