#include "Console.h" #include void InitConsole(VConsole * c, VPlayer * p, int * f) { c->p = p; c->f = f; c->Paused = 0; InitModel(&c->CockpitModel); BuildCockpitModel(&c->CockpitModel); } void CleanUpConsole(VConsole * c) { CleanUpModel(&c->CockpitModel); } void DrawConsole(VConsole * c) { char string[16]; glEnable(GL_LINE_SMOOTH); glDisable(GL_DEPTH_TEST); glPushMatrix(); glLoadIdentity(); DrawModel(&c->CockpitModel); glColor4f(1.0, 1.0, 1.0, 1.0); glPushMatrix(); glTranslatef(-0.5, -0.8, -1.6); glScalef(2.0, 2.0, 2.0); sprintf(string, "ROCKETS: %d", c->p->NumRockets); DrawCStringWithVectorFont(string); glPopMatrix(); glPushMatrix(); glTranslatef(-0.5, -1.0, -1.6); glScalef(2.0, 2.0, 2.0); sprintf(string, "SHIELDS: %d", c->p->Shields); DrawCStringWithVectorFont(string); glPopMatrix(); glPushMatrix(); glTranslatef(0.0, -1.0, -1.6); glScalef(2.0, 2.0, 2.0); if(*c->f == -1) sprintf(string, "FPS: "); else sprintf(string, "FPS: %d", *c->f); DrawCStringWithVectorFont(string); glPopMatrix(); if (c->Paused) { glPushMatrix(); glTranslatef(0.0, -0.8, -1.6); glScalef(2.0, 2.0, 2.0); DrawCStringWithVectorFont("Paused"); glPopMatrix(); } glPopMatrix(); glEnable(GL_DEPTH_TEST); glDisable(GL_LINE_SMOOTH); }