/*********************** * Johnny Jetpack * by Paul Adam and Jamie Bradley * * drawcoins.c * * this file contains all the functions needed to place platforms * in the game environment. *************************/ #include #include #include #include "johnny.h" int Platforms[MAXPLATFORMS][6]; void DrawPlatform(int bxmin, int bxmax, int bymin, int bymax, int bzmin, int bzmax) { glPushMatrix(); glTranslatef((bxmin+bxmax)/2, (bymin+bymax)/2, (bzmin+bzmax)/2); glScalef(abs(bxmin-bxmax), abs(bymin-bymax), abs(bzmin - bzmax)); glutSolidCube(1); glPopMatrix(); } void DrawAllPlatforms(void) { int i = 0; glMaterialfv (GL_FRONT_AND_BACK, GL_DIFFUSE, red); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT, cyan); for(i=0; i