home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 1 / CD_Magazyn_EXEC_nr_1.iso / Gry / battalion.lha / Battalion / source / text.c < prev    next >
C/C++ Source or Header  |  1999-12-23  |  37KB  |  1,356 lines

  1. /****************************************************************/
  2. /* code copyright 1995-1996 Andrew Johnson - ALL RIGHTS RESERVED*/
  3. /*                          ajohnson@eecs.uic.edu               */
  4. /*                                                              */
  5. /*                      Electronic Visualization Lab (M/C 154)  */
  6. /*                      University of Illinois at Chicago       */
  7. /*                      851 South Morgan St. Room 1120 SEO      */
  8. /*                      Chicago, IL 60607-7053                  */
  9. /*                                                              */
  10. /*                      (312) 996-3002     (312) 413-7585 FAX   */
  11. /***********************************************************************/
  12. /* text.c v 1.3                                                        */
  13. /* routines to display all the textual overlays for battalion          */
  14. /***********************************************************************/
  15.  
  16. #include "battalion.h"
  17.  
  18.     /*************/
  19.     /* colours   */
  20.     /*************/
  21.  
  22. extern float colorolive[4];
  23. extern float  planeGreen[4];
  24. extern float  planeGreen2[4];
  25. extern float  planeGreen3[4];
  26. extern float  colorgreen[4];
  27.  
  28. extern float  colorblack[4];
  29.  
  30. extern float  colorred[4];
  31. extern float  colorred_50[4];
  32. extern float  colorred2[4];
  33. extern float  colorred3[4];
  34.  
  35. extern float  colormaserblue[4];
  36. extern float  colormaserblue2[4];
  37.  
  38. extern float  colorwhite[4];
  39. extern float  colorwhite2[4];
  40.  
  41. extern float  colorsnow[4];
  42. extern float  colorsnow2[4];
  43.  
  44. extern float  colorgrey1[4];
  45. extern float  colorgrey1_50[4];
  46. extern float  colorgrey2[4];
  47. extern float  colorgrey3[4];
  48. extern float  colorgrey3_50[4];
  49. extern float  colorgrey4[4];
  50.  
  51. extern float  colorbrown[4];
  52. extern float  colorbeige[4];
  53.  
  54. extern float  colorblue[4];
  55. extern float  colorwater[4];
  56.  
  57. extern float  colorsnowvapour[4];
  58.  
  59. extern float  coloryellow[4];
  60. extern float  colormaseryellow[4];
  61. extern float  colororange[4];
  62.  
  63. extern float  healthGreen[4];
  64.  
  65. extern float  treeColor[4];
  66. extern float  treeColor2[4];
  67.  
  68.  
  69.  
  70. extern GLuint titleObj;
  71. extern GLuint titleObjOO;
  72. extern GLuint titleObjOOO;
  73.  
  74. extern GLuint plaintank;
  75. extern GLuint masertank;  
  76. extern GLuint launchertank;
  77.  
  78.     GLuint strokeBase;
  79.     char textline[80];
  80.  
  81. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  82.  
  83. void initFonts(void)
  84.     {
  85.     strokeBase = glGenLists(256);
  86.     if (tkCreateStrokeFont(strokeBase) == GL_FALSE)
  87.         {
  88.         showError("Can't create font");
  89.         exit(1);
  90.         }
  91.     }
  92.  
  93.  
  94. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  95. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  96. /* draw status display (energy and score)                        */
  97. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  98.  
  99. void showText(struct targetInfo * targets, float energy, int score,
  100.             long winX, int paused,  int grabbed)
  101.     {
  102.     float pixtoSpace;
  103.     struct targetInfo * temptarget;
  104.     float drop;
  105.  
  106. static    char energyEnglish[]          = "energy:";
  107. static    char pausedEnglish[]          = "<p>aused";
  108. static    char grabbedEnglish[]         = "<g>rabbed";
  109.     
  110. static float energyBar[4][3] = {
  111.         -4.0, 4.81, 0.0, 
  112.         -4.0, 4.39, 0.0, 
  113.          0.0, 4.39, 0.0, 
  114.          0.0, 4.81, 0.0};
  115.  
  116.     glPushAttrib(GL_DEPTH_BUFFER_BIT);
  117.     
  118.     glDisable(GL_DEPTH_TEST);
  119.  
  120.     pixtoSpace = 10.0 / winX;
  121.  
  122.     /* draw the energy bar */
  123.  
  124.  
  125.     if (energy > (MAXLIFE / 3))
  126.         glColor3fv(healthGreen);
  127.     else if (energy > (MAXLIFE / 10))
  128.         glColor3fv(colorbrown); 
  129.     else
  130.         glColor3fv(colorred); 
  131.         
  132.     energyBar[2][0] = energyBar[3][0] = energy / MAXLIFE * 3 - 4;
  133.  
  134.     glPushAttrib(GL_POLYGON_BIT);
  135.     glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 
  136.  
  137.  
  138.    glBegin(GL_QUADS);
  139.         glVertex3fv(energyBar[0]);
  140.         glVertex3fv(energyBar[1]);
  141.         glVertex3fv(energyBar[2]);
  142.         glVertex3fv(energyBar[3]);
  143.     glEnd(); 
  144.  
  145.     energyBar[2][0] = energyBar[3][0] = -1;
  146.  
  147.  
  148.     glColor3fv(colorwhite);     
  149.         
  150.     glBegin(GL_LINE_LOOP);
  151.         glVertex3fv(energyBar[0]);
  152.         glVertex3fv(energyBar[1]);
  153.         glVertex3fv(energyBar[2]);
  154.         glVertex3fv(energyBar[3]);
  155.     glEnd(); 
  156.  
  157.     /************************************************/
  158.     /* draw energy bar for any target on the screen */
  159.     /************************************************/
  160.  
  161.     if (targets->next != NULL)
  162.         {
  163.         drop = 0;
  164.         for(temptarget = targets->next; temptarget != NULL; temptarget = temptarget->next)
  165.             if ((fabs(temptarget->x) <= PLANESIZE) && (fabs(temptarget->z) <= PLANESIZE))
  166.             {
  167.             drop -=0.6;
  168.     
  169.             glPushMatrix();
  170.                 glTranslatef(0, drop, 0);
  171.     
  172.                 energy = temptarget->monster.energyRemaining;
  173.     
  174.                 if (energy > (MAXLIFE / 3))
  175.                     glColor3fv(healthGreen);
  176.                 else if (energy > (MAXLIFE / 10))
  177.                     glColor3fv(colorbrown); 
  178.                 else
  179.                     glColor3fv(colorred); 
  180.                     
  181.                 energyBar[2][0] = energyBar[3][0] = energy / MAXLIFE * 3 - 4;
  182.             
  183.  
  184.                 glBegin(GL_QUADS);
  185.                     glVertex3fv(energyBar[0]);
  186.                     glVertex3fv(energyBar[1]);
  187.                     glVertex3fv(energyBar[2]);
  188.                     glVertex3fv(energyBar[3]);
  189.                 glEnd(); 
  190.  
  191.                 energyBar[2][0] = energyBar[3][0] = -1;
  192.             
  193.                 glColor3fv(colorwhite); 
  194.                     
  195.                 glBegin(GL_LINE_LOOP);
  196.                     glVertex3fv(energyBar[0]);
  197.                     glVertex3fv(energyBar[1]);
  198.                     glVertex3fv(energyBar[2]);
  199.                     glVertex3fv(energyBar[3]);
  200.                 glEnd(); 
  201.     
  202.             glPopMatrix();
  203.     
  204.             glPushMatrix();
  205.                 glTranslatef(-3.8,  4.4+drop,  0);
  206.                 
  207.                 switch(temptarget->monster.monster)
  208.                     {
  209.                     case GOOGELON:  tkDrawStr(strokeBase,"Googelon");
  210.                                     break;
  211.                     case TECHS:     tkDrawStr(strokeBase,"Techs");
  212.                                     break;
  213.                     case VAPOUR:    tkDrawStr(strokeBase,"Vapour");
  214.                                     break;
  215.                     case FLUTTER:   tkDrawStr(strokeBase,"Flutter");
  216.                                     break;
  217.                     }
  218.                 glPopMatrix();
  219.             }   
  220.         }
  221.         
  222.     glPopAttrib(); /* polygon drawing */
  223.  
  224.     glPushMatrix();
  225.         glTranslatef(-3.8,  4.45,  0);
  226.         tkDrawStr(strokeBase, energyEnglish);
  227.     glPopMatrix();
  228.  
  229.     /***********************/
  230.     /* print out the score */
  231.     /***********************/
  232.  
  233.  
  234.     sprintf(textline, "score: %1d", score);
  235.     
  236.     glPushMatrix();
  237.         glTranslatef(1.9,  4.45,  0);
  238.         tkDrawStr(strokeBase, textline);
  239.     glPopMatrix();
  240.  
  241.  
  242.     /****************************/
  243.     /* print out the frame rate */
  244.     /****************************/
  245.  
  246. #ifdef DEBUG
  247.     sprintf(textline,  "%d",  winX);
  248.  
  249.     glPushMatrix();
  250.         glTranslatef(0,  4.4,  0);
  251.         tkDrawStr(strokeBase, textline);
  252.     glPopMatrix();
  253. #endif
  254.  
  255.     if (paused)
  256.         {
  257.         glPushMatrix();
  258.             glTranslatef(-0.7,  4.6,  0);       
  259.             tkDrawStr(strokeBase, pausedEnglish);
  260.         glPopMatrix();
  261.  
  262.         }
  263.         
  264.     if (grabbed)
  265.         {
  266.         glPushMatrix();
  267.             glTranslatef(-0.85,  4.2,  0);      
  268.             tkDrawStr(strokeBase, grabbedEnglish);
  269.         glPopMatrix();
  270.  
  271.         }
  272.         
  273.     glPopAttrib();
  274.     }   
  275.  
  276. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  277.  
  278. void showScores(int itsChristmas, struct score* gscore, struct score* vscore,
  279.                 struct score* tscore, struct score* fscore, 
  280.                 struct monsterInfo monster, int counter,
  281.                 float offsetX, int detail)
  282.     {
  283.     char textString[256];
  284.     struct monsterInfo tempMonster;
  285.     GLfloat lineWidthNow;
  286.  
  287. static    float scoreBox[4][3] = {
  288.         -1,  0.42, 7.1,
  289.         -1, -0.6, 7.1,
  290.          1, -0.6, 7.1, 
  291.          1,  0.42, 7.1};
  292.  
  293. glPushAttrib(GL_DEPTH_BUFFER_BIT);
  294.  
  295.     /***********************************/
  296.     /* these monsters are always alive */
  297.     /***********************************/
  298.    
  299.     tempMonster                 = monster;
  300.     tempMonster.energyRemaining = 100;
  301.     tempMonster.monsterIsDead   = 0;
  302.     tempMonster.deadCount       = 0;
  303.                 
  304.     /*************************************/
  305.     /* draw transparent brown background */
  306.     /*************************************/
  307.  
  308.     glColor4fv(colorbrown);
  309.  
  310.     glDisable(GL_DEPTH_TEST);
  311.  
  312.     if (detail == -1)
  313.         {
  314.         glBegin(GL_QUADS);
  315.             glVertex3fv(scoreBox[0]);
  316.             glVertex3fv(scoreBox[1]);
  317.             glVertex3fv(scoreBox[2]);
  318.             glVertex3fv(scoreBox[3]);
  319.         glEnd();                
  320.         }
  321.     else  if (detail == 0)
  322.         {
  323.  
  324.         glBegin(GL_QUADS);
  325.             glVertex3fv(scoreBox[0]);
  326.             glVertex3fv(scoreBox[1]);
  327.             glVertex3fv(scoreBox[2]);
  328.             glVertex3fv(scoreBox[3]);
  329.         glEnd();                
  330.         }
  331.     else
  332.  
  333.         {
  334.         glEnable(GL_BLEND);
  335.         
  336.         glBegin(GL_QUADS);
  337.             glVertex3fv(scoreBox[0]);
  338.             glVertex3fv(scoreBox[1]);
  339.             glVertex3fv(scoreBox[2]);
  340.             glVertex3fv(scoreBox[3]);
  341.         glEnd();                
  342.      
  343.         glDisable(GL_BLEND);
  344.         }
  345.  
  346.     /*****************/
  347.     /* draw monsters */
  348.     /*****************/
  349.  
  350.     if (detail != -1)
  351.         glEnable(GL_DEPTH_TEST);
  352.  
  353.     glGetFloatv(GL_LINE_WIDTH, &lineWidthNow);
  354.     glLineWidth(2.01);
  355.  
  356.             
  357.     glPushMatrix();
  358.         glTranslatef(-0.8,  0.14,  7.2);
  359.         glScalef(.2,  .2,  .2);
  360.         drawMonster(tempMonster, counter, itsChristmas, detail);
  361.     glPopMatrix();
  362.  
  363.     glPushMatrix();
  364.         glTranslatef(-0.8,  -0.23,  7.2);
  365.         glScalef(.2,  .2,  .2);
  366.         drawVapour(tempMonster, itsChristmas, detail);
  367.     glPopMatrix();
  368.         
  369.     glPushMatrix();
  370.         glTranslatef(+.14,  0.1,  7.2);
  371.         glScalef(.2,  .2,  .2);
  372.         drawTechs(tempMonster, detail);
  373.     glPopMatrix();
  374.  
  375.     glPushMatrix();
  376.         glTranslatef(+.14,  -0.26,  7.2);
  377.         glScalef(.2,  .2,  .2);
  378.         drawFlutter(tempMonster, counter, itsChristmas, offsetX, OMNISCIENTVIEW, detail);
  379.     glPopMatrix();
  380.  
  381.     glLineWidth(lineWidthNow);
  382.  
  383.  
  384.     /*************/
  385.     /* draw text */
  386.     /*************/
  387.  
  388.     glColor3fv(colorwhite); 
  389.  
  390.    glDisable(GL_DEPTH_TEST);
  391.  
  392.     glPushMatrix();
  393.         glTranslatef(-2,  1.4,  0);
  394.         tkDrawStr(strokeBase, "High Scores");
  395.     glPopMatrix();
  396.  
  397.  
  398.     /*************************************/
  399.  
  400.  
  401.     if (gscore[0].number > -1)
  402.         {
  403.         sprintf(textString, "%5d %s", gscore[0].number, gscore[0].name); 
  404.         glPushMatrix();
  405.             glTranslatef(-4,  0.5,  0);
  406.             tkDrawStr(strokeBase, textString);
  407.         glPopMatrix();
  408.         }
  409.     else
  410.         {
  411.         glPushMatrix();
  412.             glTranslatef(-4,  0.5,  0);
  413.             tkDrawStr(strokeBase, "  none");
  414.         glPopMatrix();
  415.         }
  416.     
  417.     if (gscore[1].number > -1)
  418.         {
  419.         sprintf(textString, "%5d %s", gscore[1].number, gscore[1].name); 
  420.         glPushMatrix();
  421.             glTranslatef(-4,  0,  0);
  422.             tkDrawStr(strokeBase, textString);
  423.         glPopMatrix();
  424.        }
  425.     
  426.     if (gscore[2].number > -1)
  427.         {
  428.         sprintf(textString, "%5d %s", gscore[2].number, gscore[2].name); 
  429.         glPushMatrix();
  430.             glTranslatef(-4,  -0.5,  0);
  431.             tkDrawStr(strokeBase, textString);
  432.         glPopMatrix();
  433.         }
  434.  
  435.     /*************************************/
  436.  
  437.     if (vscore[0].number > -1)
  438.         {
  439.         sprintf(textString, "%5d %s", vscore[0].number, vscore[0].name); 
  440.         glPushMatrix();
  441.             glTranslatef(-4,  -1.5,  0);
  442.             tkDrawStr(strokeBase, textString);
  443.         glPopMatrix();
  444.         }
  445.     else
  446.         {
  447.         glPushMatrix();
  448.             glTranslatef(-4,  -1.5,  0);
  449.             tkDrawStr(strokeBase, "  none");
  450.         glPopMatrix();
  451.         }
  452.         
  453.     if (vscore[1].number > -1)
  454.         {
  455.         sprintf(textString, "%5d %s", vscore[1].number, vscore[1].name); 
  456.         glPushMatrix();
  457.             glTranslatef(-4,  -2,  0);
  458.             tkDrawStr(strokeBase, textString);
  459.         glPopMatrix();
  460.         }
  461.  
  462.     if (vscore[2].number > -1)
  463.         {
  464.         sprintf(textString, "%5d %s", vscore[2].number, vscore[2].name); 
  465.         glPushMatrix();
  466.             glTranslatef(-4,  -2.5,  0);
  467.             tkDrawStr(strokeBase, textString);
  468.         glPopMatrix();
  469.         }
  470.         
  471.     /*************************************/
  472.  
  473.     if (tscore[0].number > -1)
  474.         {
  475.         sprintf(textString, "%5d %s", tscore[0].number, tscore[0].name); 
  476.         glPushMatrix();
  477.             glTranslatef(0.6,  0.5,  0);
  478.             tkDrawStr(strokeBase, textString);
  479.         glPopMatrix();
  480.         }
  481.     else
  482.         {
  483.         glPushMatrix();
  484.             glTranslatef(0.6,  0.5,  0);
  485.             tkDrawStr(strokeBase, "  none");
  486.         glPopMatrix();
  487.         }
  488.         
  489.    if (tscore[1].number > -1)
  490.         {
  491.         sprintf(textString, "%5d %s", tscore[1].number, tscore[1].name); 
  492.         glPushMatrix();
  493.             glTranslatef(0.6,  0,  0);
  494.             tkDrawStr(strokeBase, textString);
  495.         glPopMatrix();
  496.         }
  497.         
  498.    if (tscore[2].number > -1)
  499.         {
  500.         sprintf(textString, "%5d %s", tscore[2].number, tscore[2].name); 
  501.         glPushMatrix();
  502.             glTranslatef(0.6,  -0.5,  0);
  503.             tkDrawStr(strokeBase, textString);
  504.         glPopMatrix();
  505.         }
  506.         
  507.     /*************************************/
  508.  
  509.     if (fscore[0].number > -1)
  510.         {
  511.         sprintf(textString, "%5d %s", fscore[0].number, fscore[0].name); 
  512.         glPushMatrix();
  513.             glTranslatef(0.6,  -1.5,  0);
  514.             tkDrawStr(strokeBase, textString);
  515.         glPopMatrix();
  516.         }
  517.     else
  518.         {
  519.         glPushMatrix();
  520.             glTranslatef(0.6,  -1.5,  0);
  521.             tkDrawStr(strokeBase, "  none");
  522.         glPopMatrix();
  523.         }
  524.  
  525.     if (fscore[1].number > -1)
  526.         {
  527.         sprintf(textString, "%5d %s", fscore[1].number, fscore[1].name); 
  528.         glPushMatrix();
  529.             glTranslatef(0.6,  -2,  0);
  530.             tkDrawStr(strokeBase, textString);
  531.         glPopMatrix();
  532.         }
  533.         
  534.     if (fscore[2].number > -1)
  535.         {       
  536.         sprintf(textString, "%5d %s", fscore[2].number, fscore[2].name); 
  537.         glPushMatrix();
  538.             glTranslatef(0.6,  -2.5,  0);
  539.             tkDrawStr(strokeBase, textString);
  540.         glPopMatrix();
  541.         }
  542.  
  543.     glPopAttrib();
  544.     }
  545.     
  546. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  547. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  548. /* draw list of views/options/controls)                          */
  549. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  550.  
  551. void showText2(long winX, int soundOn, int noSound, int musicOn, 
  552.                 int mode3D, int no3D, int detail, int paused,
  553.                 int itsChristmas, int ptrGrab)
  554.     {
  555.     float pixtoSpace;
  556.     float right;
  557.     int garbage;
  558.  
  559. static    char viewsEnglish[]   = "Views:";
  560. static    char views1English[]  = "-Monster";
  561. static    char views2English[]  = "-Overview";
  562. static    char views3English[]  = "-Army";
  563.  
  564. static    char onstring[]               = " (ON)";
  565. static    char offstring[]              = " (OFF)";
  566. static    char linstring[]              = " (VEC)";
  567. static    char lowstring[]              = " (LOW)";
  568. static    char medstring[]              = " (MED)";
  569. static    char highstring[]             = " (HIGH)";
  570. static    char unavailablestring[]      = " ( - )";
  571.  
  572. static    char moveEnglish[]            = "mouse/arrows";
  573. static    char shootEnglish[]           = "left btn/ctrl";
  574. static    char azEnglish[]              = "a z";
  575.  
  576. static    char grabEnglish[]            = "-PtGrab";
  577. /* static    char videoEnglish[]        = "-3D"; */
  578.  
  579. static    char rotateEnglish[]          = "- Rotate Overview";
  580. static    char ijklEnglish[]            = "ijkl";
  581. static    char showcaseEnglish[]        = "-Help";
  582.  
  583. static    char pauseEnglish[]           = "-Pause";
  584. static    char detailEnglish[]          = "-Detail";
  585. static    char soundEnglish[]           = "-Sound";
  586. static    char musicEnglish[]           = "-Music";
  587.  
  588.     glPushAttrib(GL_DEPTH_BUFFER_BIT);
  589.     
  590.     pixtoSpace = 3.0/ winX;
  591.           
  592.     glDisable(GL_DEPTH_TEST);
  593.  
  594.  
  595.     if (itsChristmas)
  596.         glColor3fv(planeGreen); 
  597.     else
  598.         glColor3fv(coloryellow); 
  599.  
  600.     /*********/
  601.     /* views */
  602.     /*********/
  603.  
  604.     glPushMatrix();
  605.         glTranslatef(-5.0,  +0.7,  0);
  606.         tkDrawStr(strokeBase, viewsEnglish);
  607.     glPopMatrix();
  608.  
  609.     glPushMatrix();
  610.         glTranslatef(-4.8,  0.2,  0);
  611.         tkDrawStr(strokeBase, "1");
  612.         
  613.         glTranslatef(0.2,  0,  0);
  614.         tkDrawStr(strokeBase, views1English);
  615.     glPopMatrix();
  616.     
  617.     glPushMatrix();
  618.         glTranslatef(-4.8,  -0.3,  0);
  619.         tkDrawStr(strokeBase, "2");
  620.         
  621.         glTranslatef(0.2,  0,  0);      
  622.         tkDrawStr(strokeBase, views2English);
  623.     glPopMatrix();    
  624.     
  625.     glPushMatrix();
  626.         glTranslatef(-4.8,  -0.8,  0);
  627.         tkDrawStr(strokeBase, "3");
  628.         
  629.         glTranslatef(0.2,  0,  0);
  630.         tkDrawStr(strokeBase, views3English);
  631.     glPopMatrix();    
  632.  
  633.  
  634.  
  635.     /************/
  636.     /* controls */
  637.     /************/
  638.  
  639.     if (mode3D)
  640.         right = 0.2;
  641.     else
  642.         right = -1.0;
  643.  
  644.  
  645.     glPushMatrix();
  646.         glTranslatef(right+0.3,  -2,  0);
  647.         tkDrawStr(strokeBase, "Controls:");
  648.     glPopMatrix();
  649.  
  650.     glPushMatrix();
  651.         glTranslatef(right + 0.5,  -2.5,  0);
  652.         tkDrawStr(strokeBase, moveEnglish);
  653.     glPopMatrix();
  654.     glPushMatrix();
  655.         glTranslatef(right + 4.1,  -2.5,  0);
  656.         tkDrawStr(strokeBase, "-Move");
  657.     glPopMatrix();
  658.         
  659.  
  660.     glPushMatrix();
  661.         glTranslatef(right + 0.5,  -3,  0);
  662.         tkDrawStr(strokeBase, shootEnglish);
  663.     glPopMatrix();
  664.     glPushMatrix();
  665.         glTranslatef(right + 4.1,  -3,  0);
  666.         tkDrawStr(strokeBase, "-Attack");
  667.     glPopMatrix();
  668.    
  669.  
  670.     glPushMatrix();
  671.         glTranslatef(right+0.5,  -3.5,  0);
  672.         tkDrawStr(strokeBase, azEnglish);
  673.     glPopMatrix();
  674.     glPushMatrix();
  675.         glTranslatef(right + 3.25,  -3.5,  0);
  676.         tkDrawStr(strokeBase, "-Tilt Head");
  677.     glPopMatrix();
  678.  
  679.  
  680.     glPushMatrix();
  681.         glTranslatef(right+0.5,  -4,  0);
  682.         tkDrawStr(strokeBase, ijklEnglish);
  683.     glPopMatrix();
  684.     glPushMatrix();
  685.         glTranslatef(right+1.5,  -4,  0);
  686.         tkDrawStr(strokeBase, rotateEnglish);
  687.     glPopMatrix();
  688.  
  689.     /***********/
  690.     /* options */
  691.     /***********/
  692.  
  693.  
  694.     glPushMatrix();
  695.         glTranslatef(-5,  -2,  0);
  696.         tkDrawStr(strokeBase, "Options:");
  697.     glPopMatrix();
  698.  
  699.  
  700.  
  701.     glPushMatrix();
  702.         glTranslatef(-4.8,  -2.5,  0);
  703.         tkDrawStr(strokeBase, "d");
  704.  
  705.         glTranslatef(0.2,  0,  0);
  706.         tkDrawStr(strokeBase, detailEnglish);
  707.     glPopMatrix();
  708.     glPushMatrix();
  709.         glTranslatef(-2.65,  -2.5,  0);
  710.         switch (detail) {
  711.         case -1:
  712.             tkDrawStr(strokeBase, linstring);
  713.             break;
  714.         case 0:
  715.             tkDrawStr(strokeBase, lowstring);
  716.             break;
  717.         case 1:
  718.             tkDrawStr(strokeBase, medstring);
  719.             break;
  720.         case 2:
  721.             tkDrawStr(strokeBase, highstring);
  722.             break;
  723.         }
  724.     glPopMatrix();
  725.     
  726.     
  727.  
  728.  
  729.     glPushMatrix();
  730.         glTranslatef(-4.8,  -3,  0);
  731.         tkDrawStr(strokeBase, "s");
  732.  
  733.         glTranslatef(0.2,  0,  0);
  734.         tkDrawStr(strokeBase, soundEnglish);
  735.     glPopMatrix();
  736.  
  737.     glPushMatrix();
  738.         glTranslatef(-2.65,  -3,  0);
  739.  
  740.         if (noSound)
  741.             tkDrawStr(strokeBase,unavailablestring);
  742.         else
  743.             soundOn ? tkDrawStr(strokeBase,onstring) : tkDrawStr(strokeBase,offstring);
  744.     glPopMatrix();
  745.  
  746.  
  747.     glPushMatrix();
  748.         glTranslatef(-4.8,  -3.5,  0);
  749.         tkDrawStr(strokeBase, "m");
  750.  
  751.         glTranslatef(0.2,  0,  0);
  752.         tkDrawStr(strokeBase, musicEnglish);
  753.     glPopMatrix();
  754.  
  755.     glPushMatrix();
  756.         glTranslatef(-2.65,  -3.5,  0);
  757.  
  758.         if (noSound)
  759.             tkDrawStr(strokeBase,unavailablestring);
  760.         else
  761.             musicOn ? tkDrawStr(strokeBase,onstring) : tkDrawStr(strokeBase,offstring);
  762.     glPopMatrix();
  763.         
  764.         
  765.     glPushMatrix();
  766.         glTranslatef(-4.8,  -4,  0);
  767.         tkDrawStr(strokeBase, "p");
  768.  
  769.         glTranslatef(0.2,  0,  0);
  770.         tkDrawStr(strokeBase, pauseEnglish);
  771.     glPopMatrix();
  772.  
  773.     glPushMatrix();
  774.         glTranslatef(-2.65,  -4,  0);
  775.         paused ? tkDrawStr(strokeBase,onstring) : tkDrawStr(strokeBase,offstring);
  776.     glPopMatrix();
  777.  
  778.  
  779.     glPushMatrix();
  780.         glTranslatef(-4.8,  -4.5,  0);
  781.         tkDrawStr(strokeBase, "g");
  782.  
  783.         glTranslatef(0.2,  0,  0);
  784.         tkDrawStr(strokeBase, grabEnglish);
  785.     glPopMatrix();
  786.  
  787.     glPushMatrix();
  788.         glTranslatef(-2.65,  -4.5,  0);
  789.  
  790. #ifdef MACVERSION
  791.             tkDrawStr(strokeBase,unavailablestring);
  792. #else
  793.         ptrGrab ? tkDrawStr(strokeBase,onstring) :
  794.                   tkDrawStr(strokeBase,offstring);
  795. #endif
  796.     glPopMatrix();
  797.  
  798.     garbage = no3D;
  799. /* someday the 3D from the Original GL version will return in
  800.  * the OpenGL version ... but not yet
  801.  
  802.     glPushMatrix();
  803.         glTranslatef(-4.8,  -4.5,  0);
  804.         tkDrawStr(strokeBase, "v");
  805.  
  806.         glTranslatef(0.2,  0,  0);
  807.         tkDrawStr(strokeBase, videoEnglish);
  808.     glPopMatrix();
  809.  
  810.     glPushMatrix();
  811.         glTranslatef(-2.65, -4.5,  0);
  812.  
  813.         if (no3D)
  814.             tkDrawStr(strokeBase,unavailablestring);
  815.         else
  816.             mode3D ? tkDrawStr(strokeBase,onstring) : tkDrawStr(strokeBase,offstring);
  817.  
  818.     glPopMatrix();
  819. */
  820.  
  821.     glPushMatrix();
  822.         glTranslatef(-4.8,  -5,  0);
  823.         tkDrawStr(strokeBase, "h");
  824.  
  825.         glTranslatef(0.2,  0,  0);
  826.         tkDrawStr(strokeBase, showcaseEnglish);
  827.     glPopMatrix();
  828.  
  829. #ifndef SGIVERSION
  830.     glPushMatrix();
  831.         glTranslatef(-2.65,  -5,  0);
  832.  
  833.         tkDrawStr(strokeBase,unavailablestring);
  834.  
  835.     glPopMatrix();
  836. #endif
  837.  
  838.     glPopAttrib();
  839.     }
  840.  
  841. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  842. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  843. /* draw the 'andy johnson's battalion' title                     */
  844. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  845.  
  846. void showText3(int detail)
  847.     {
  848. static    char andyEnglish[]            = "andy johnson's";
  849. static    char versionEnglish[]         = "1.4";
  850.  
  851.     /************************/
  852.     /* print battalion logo */
  853.     /************************/
  854.  
  855.     if (detail > 0)
  856.         glCallList(titleObj);
  857.     else if (detail == 0)
  858.         glCallList(titleObjOO);
  859.     else if (detail == -1)
  860.         {
  861.         glPushAttrib(GL_POLYGON_BIT);
  862.         glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
  863.         
  864.         glCallList(titleObjOOO);
  865.         
  866.         glPopAttrib();
  867.         }
  868.         
  869.     glColor3fv(colorwhite); 
  870.  
  871.     /**************************/
  872.     /* print "andy johnsons'" */
  873.     /**************************/
  874.  
  875.     glPushMatrix();
  876.         glTranslatef(1.6 ,  +3.85,  0);
  877.         glScalef(0.57, 0.83, 1);
  878.         tkDrawStr(strokeBase, andyEnglish);
  879.     glPopMatrix();
  880.  
  881.     /************************/
  882.     /* print version number */
  883.     /************************/
  884.  
  885.             glPushAttrib(GL_DEPTH_BUFFER_BIT);
  886.                 glDisable(GL_DEPTH_TEST);
  887.  
  888.     glPushMatrix();
  889.         glTranslatef(3.5,  -5.1,  0);
  890.         glScalef(0.75, 0.75, 1);
  891.         tkDrawStr(strokeBase, versionEnglish);
  892.     glPopMatrix();
  893.  
  894. glPopAttrib();
  895.    }
  896.  
  897. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  898. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  899. /* draw 'press spacebar to begin'                                */
  900. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  901.  
  902. void showText4()
  903.     {
  904. static    char spaceEnglish[]           = "Press the spacebar to begin";
  905.  
  906.     glColor3fv(colorwhite); 
  907.  
  908.     glPushMatrix();
  909.         glTranslatef(-3.85,  2.3,  0);
  910.         tkDrawStr(strokeBase, spaceEnglish);
  911.     glPopMatrix();
  912.     }
  913.  
  914. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  915. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  916. /* draw option menu for choosing monster                         */
  917. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  918.  
  919. void doOptions(struct monsterInfo monster, long xWin, int counter,
  920.                 int itsChristmas, float offsetX, int detail)
  921.     {
  922.     float pixtoSpace;
  923.     struct monsterInfo tempMonster;
  924.     GLfloat lineWidthNow;
  925.  
  926. static    char googelonEnglish[]        = "Googelon-6";    
  927. static    char techsEnglish[]           = "Techs-7";    
  928. static    char vapourEnglish[]          = "The Vapour-8";    
  929. static    char flutterEnglish[]         = "Flutter-9";
  930.  
  931.     static float optionsBox[4][3] = {
  932.         -0.85,  0.5, 7.1,
  933.         -0.85, -1.0, 7.1,
  934.          0.85, -1.0, 7.1, 
  935.          0.85,  0.5, 7.1};
  936.  
  937.     glPushAttrib(GL_DEPTH_BUFFER_BIT);
  938.  
  939.     /***********************************/
  940.     /* these monsters are always alive */
  941.     /***********************************/
  942.    
  943.     tempMonster                 = monster;
  944.     tempMonster.energyRemaining = 100;
  945.     tempMonster.monsterIsDead   = 0;
  946.     tempMonster.deadCount       = 0;
  947.                 
  948.     /*************************************/
  949.     /* draw transparent brown background */
  950.     /*************************************/
  951.  
  952.     glDisable(GL_DEPTH_TEST);
  953.  
  954.     glColor4fv(colorbrown);
  955.  
  956.     if (detail <= 0)
  957.         {
  958.         glBegin(GL_QUADS);
  959.             glVertex3fv(optionsBox[0]);
  960.             glVertex3fv(optionsBox[1]);
  961.             glVertex3fv(optionsBox[2]);
  962.             glVertex3fv(optionsBox[3]);
  963.         glEnd();                
  964.         }
  965.     else
  966.         {
  967.         glEnable(GL_BLEND);
  968.         
  969.         glBegin(GL_QUADS);
  970.             glVertex3fv(optionsBox[0]);
  971.             glVertex3fv(optionsBox[1]);
  972.             glVertex3fv(optionsBox[2]);
  973.             glVertex3fv(optionsBox[3]);
  974.         glEnd();                
  975.     
  976.         glDisable(GL_BLEND);
  977.         }
  978.  
  979.  
  980.     /*************/
  981.     /* draw text */
  982.     /*************/
  983.  
  984.     pixtoSpace = 2.0 / xWin;
  985.  
  986.     glColor3fv(colorwhite); 
  987.  
  988.     glPushMatrix();
  989.         glTranslatef(-2.72,  1.75,  0); 
  990.         tkDrawStr(strokeBase, "Choose your monster:");
  991.     glPopMatrix();
  992.  
  993.     glPushMatrix();
  994.         glTranslatef(-3.72,  -.6,  0);
  995.         tkDrawStr(strokeBase, googelonEnglish);
  996.     glPopMatrix();
  997.  
  998.     glPushMatrix();
  999.         glTranslatef(1.2,  -.6,  0);
  1000.         tkDrawStr(strokeBase, techsEnglish);
  1001.     glPopMatrix();
  1002.  
  1003.     glPushMatrix();
  1004.         glTranslatef(-4,  -4,  0);
  1005.         tkDrawStr(strokeBase, vapourEnglish);
  1006.     glPopMatrix();
  1007.  
  1008.     glPushMatrix();
  1009.         glTranslatef(1.1,  -4,  0);
  1010.         tkDrawStr(strokeBase, flutterEnglish);
  1011.     glPopMatrix();
  1012.  
  1013.  
  1014.     /*****************/
  1015.     /* draw monsters */
  1016.     /*****************/
  1017.  
  1018.     if (detail != -1)
  1019.         glEnable(GL_DEPTH_TEST);
  1020.  
  1021.     glGetFloatv(GL_LINE_WIDTH, &lineWidthNow);
  1022.     glLineWidth(2.01);
  1023.             
  1024.     glPushMatrix();
  1025.         glTranslatef(-.5,  0.25,  7.2);
  1026.         glScalef(.25,  .25,  .25);
  1027.         drawMonster(tempMonster, counter, itsChristmas, detail);
  1028.     glPopMatrix();
  1029.         
  1030.     glPushMatrix();
  1031.         glTranslatef(+.5,  0.25,  7.2);
  1032.         glScalef(.25,  .25,  .25);
  1033.         drawTechs(tempMonster, detail);
  1034.     glPopMatrix();
  1035.  
  1036.     glPushMatrix();
  1037.         glTranslatef(-.5,  -0.4,  7.2);
  1038.         glScalef(.25,  .25,  .25);
  1039.         drawVapour(tempMonster, itsChristmas, detail);
  1040.     glPopMatrix();
  1041.  
  1042.     glPushMatrix();
  1043.         glTranslatef(+.5,  -0.4,  7.2);
  1044.         glScalef(.25,  .25,  .25);
  1045.         drawFlutter(tempMonster, counter, itsChristmas, offsetX, OMNISCIENTVIEW, detail);
  1046.     glPopMatrix();
  1047.  
  1048.     glPopAttrib();
  1049.  
  1050.     glLineWidth(lineWidthNow);
  1051.    }
  1052.  
  1053. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  1054. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  1055. /* draw summary of kills                                         */
  1056. /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
  1057.  
  1058. void doSummary(int monster,  int deadTime, long winX, int killtanks,
  1059.                 int killmtanks, int killhelos,
  1060.                 int killCHHs, int killmechags,
  1061.                 int killheros, int killplanes, int killlaunchers,
  1062.                 int killfighters,
  1063.                 int counter, int detail, int moreThanOne)
  1064.     {    
  1065.     int angle;
  1066.     float pixtoSpace;
  1067.     char resultString[15];
  1068.     char monsterString[40];
  1069.     GLfloat lineWidthNow;
  1070.  
  1071. static    float summaryBox[4][3] = {
  1072.         -0.97,  0.25,  7.0,
  1073.         -0.97, -1.05,  7.0,
  1074.          0.97, -1.05,  7.0, 
  1075.          0.97,  0.25,  7.0};
  1076.  
  1077.     glPushAttrib(GL_DEPTH_BUFFER_BIT);
  1078.  
  1079.     pixtoSpace = 2.0 / winX;
  1080.  
  1081.     angle = (deadTime * 10) % 3600;
  1082.  
  1083.     glDisable(GL_DEPTH_TEST);
  1084.  
  1085.     glColor4fv(colorbrown);
  1086.     
  1087.     if (detail <= 0)
  1088.         {
  1089.         glBegin(GL_QUADS);
  1090.             glVertex3fv(summaryBox[0]);
  1091.             glVertex3fv(summaryBox[1]);
  1092.             glVertex3fv(summaryBox[2]);
  1093.             glVertex3fv(summaryBox[3]);
  1094.         glEnd();                
  1095.         }
  1096.     else 
  1097.         {
  1098.         glEnable(GL_BLEND);
  1099.  
  1100.         glBegin(GL_QUADS);
  1101.             glVertex3fv(summaryBox[0]);
  1102.             glVertex3fv(summaryBox[1]);
  1103.             glVertex3fv(summaryBox[2]);
  1104.             glVertex3fv(summaryBox[3]);
  1105.         glEnd();                
  1106.         
  1107.     
  1108.         glDisable(GL_BLEND);
  1109.         }
  1110.     
  1111.  
  1112.     glColor3fv(colorwhite); 
  1113.  
  1114.     if ((killtanks > 0) || (killlaunchers > 0) || (killmtanks > 0) || (killhelos > 0) ||
  1115.         (killmechags > 0) || (killfighters > 0) || (killCHHs > 0) || (killheros > 0) || (killplanes > 0))
  1116.             strcpy(resultString, ":");
  1117.     else
  1118.             strcpy(resultString, " nothing.");
  1119.  
  1120.     if (moreThanOne)    
  1121.         {
  1122.          sprintf(monsterString, "The monsters destroyed %s", resultString);
  1123.         }
  1124.     else
  1125.         {
  1126.         switch(monster){
  1127.             case GOOGELON:  sprintf(monsterString, "Googelon destroyed %s", resultString);
  1128.                             break;
  1129.             case VAPOUR:    sprintf(monsterString, "The Vapour destroyed %s", resultString);
  1130.                             break;
  1131.             case TECHS:     sprintf(monsterString, "Techs destroyed %s", resultString);
  1132.                             break;
  1133.             case FLUTTER:   sprintf(monsterString, "Flutter destroyed %s", resultString);
  1134.                             break;
  1135.             default:        showError("Bogus Monster! (doSummary)");
  1136.                             break;
  1137.             }
  1138.         }
  1139.  
  1140.     glPushMatrix();
  1141.         glTranslatef(-4.25, .5,  0);
  1142.         tkDrawStr(strokeBase, monsterString);
  1143.     glPopMatrix();
  1144.  
  1145.  
  1146.     if (killfighters > 0)
  1147.         {
  1148.     glPushMatrix();
  1149.         glTranslatef(-2.9-1.3,  -2.3,  0);
  1150.         if (killfighters > 1)
  1151.                 sprintf(textline,  "%1d Fighters", killfighters);
  1152.         else
  1153.                 sprintf(textline,  "%1d Fighter", killfighters);
  1154.         tkDrawStr(strokeBase, textline);
  1155.     glPopMatrix();
  1156.         }
  1157.  
  1158.     if (killtanks > 0)
  1159.         {
  1160.     glPushMatrix();
  1161.         glTranslatef(-3-1.1,  -1,  0);
  1162.         if (killtanks > 1)
  1163.                 sprintf(textline,  "%1d Tanks", killtanks);
  1164.         else
  1165.                 sprintf(textline,  "%1d Tank", killtanks);
  1166.         tkDrawStr(strokeBase, textline);
  1167.     glPopMatrix();
  1168.         }
  1169.  
  1170.     if (killlaunchers > 0)
  1171.         {
  1172.     glPushMatrix();
  1173.         glTranslatef(2.6-1.6,  -2.3,  0);
  1174.         if (killlaunchers > 1)
  1175.                 sprintf(textline,  "%1d Launchers", killlaunchers);
  1176.         else
  1177.                 sprintf(textline,  "%1d Launcher", killlaunchers);
  1178.         tkDrawStr(strokeBase, textline);
  1179.     glPopMatrix();
  1180.         }
  1181.         
  1182.     if (killhelos > 0)
  1183.         {
  1184.     glPushMatrix();
  1185.         glTranslatef(3.1-1.0,  -1,  0);
  1186.         if (killhelos > 1)
  1187.                 sprintf(textline,  "%1d Helos", killhelos);
  1188.         else
  1189.                 sprintf(textline,  "%1d Helo", killhelos);
  1190.         tkDrawStr(strokeBase, textline);
  1191.     glPopMatrix();
  1192.         }
  1193.  
  1194.     if (killmtanks > 0)
  1195.         {
  1196.     glPushMatrix();
  1197.         glTranslatef(-0.2-1.2, -2.8,  0);
  1198.         if (killmtanks > 1)
  1199.                 sprintf(textline,  "%1d Masers", killmtanks);
  1200.         else
  1201.                 sprintf(textline,  "%1d Maser", killmtanks);
  1202.         tkDrawStr(strokeBase, textline);
  1203.     glPopMatrix();
  1204.         }
  1205.  
  1206.  
  1207.     if (killplanes > 0)
  1208.         {
  1209.     glPushMatrix();
  1210.         glTranslatef(0-1.4,  -1,  0);
  1211.         if (killplanes > 1)
  1212.                 sprintf(textline,  "%1d Bombers", killplanes);
  1213.         else
  1214.                 sprintf(textline,  "%1d Bomber", killplanes);
  1215.         tkDrawStr(strokeBase, textline);
  1216.     glPopMatrix();
  1217.         }
  1218.         
  1219.         
  1220.     if (killmechags > 0)
  1221.         {
  1222.     glPushMatrix();
  1223.         glTranslatef(2.8-1.4,  -4.7,  0);
  1224.         if (killmechags > 1)
  1225.                 sprintf(textline,  "%1d MechaGs", killmechags);
  1226.         else
  1227.                 sprintf(textline,  "%1d MechaG", killmechags);
  1228.         tkDrawStr(strokeBase, textline);
  1229.     glPopMatrix();
  1230.         }
  1231.         
  1232.     if (killCHHs > 0)
  1233.         {
  1234.     glPushMatrix();
  1235.         glTranslatef(0-1.3,  -4.7,  0);
  1236.         if (killCHHs > 1)
  1237.                 sprintf(textline,  "%1d Hunters", killCHHs);
  1238.         else
  1239.                 sprintf(textline,  "%1d Hunter", killCHHs);
  1240.         tkDrawStr(strokeBase, textline);
  1241.     glPopMatrix();
  1242.         }
  1243.  
  1244.     if (killheros > 0)
  1245.         {
  1246.     glPushMatrix();
  1247.         glTranslatef(-3-1.0,  -4.7,  0);
  1248.         if (killheros > 1)
  1249.                 sprintf(textline,  "%1d Heros", killheros);
  1250.         else
  1251.                 sprintf(textline,  "%1d Hero", killheros);
  1252.         tkDrawStr(strokeBase, textline);
  1253.     glPopMatrix();
  1254.         }
  1255.  
  1256.     if (detail != -1)
  1257.         glEnable(GL_DEPTH_TEST);
  1258.  
  1259.     glGetFloatv(GL_LINE_WIDTH, &lineWidthNow);
  1260.     glLineWidth(2.01);
  1261.  
  1262.     if (killfighters > 0)
  1263.         {
  1264.         glPushMatrix();
  1265.             glTranslatef(-0.65,  -.3,  7.1);
  1266.             glRotatef(.1*angle + 180, 0, 1, 0);
  1267.             glScalef(.6,  .6,  .6);
  1268.             drawFighter();
  1269.         glPopMatrix();
  1270.         }
  1271.  
  1272.     if (killtanks > 0)
  1273.         {
  1274.         glPushMatrix();
  1275.             glTranslatef(-.65,  -.1,  7.1);
  1276.             glRotatef(.1*angle + 270, 0, 1, 0);
  1277.             glScalef(0.33,  0.33,  0.33);
  1278.             glCallList(plaintank);
  1279.         glPopMatrix();
  1280.         }
  1281.  
  1282.     if (killlaunchers > 0)
  1283.         {
  1284.         glPushMatrix();
  1285.             glTranslatef(.5,  -.35,  7.1);
  1286.             glRotatef(.1*angle + 270, 0, 1, 0);
  1287.             glScalef(0.33,  0.33,  0.33);
  1288.             glCallList(launchertank);
  1289.         glPopMatrix();
  1290.         }
  1291.         
  1292.     if (killmtanks > 0)
  1293.         {
  1294.         glPushMatrix();
  1295.             glTranslatef(-0.1,  -.42,  7.1);
  1296.             glRotatef(.1*angle + 45, 0, 1, 0);
  1297.             glScalef(0.05,  0.05,  0.05);
  1298.             glCallList(masertank);
  1299.         glPopMatrix();
  1300.         }
  1301.  
  1302.     if (killhelos > 0)
  1303.         {
  1304.         glPushMatrix();
  1305.             glTranslatef(.65,  0,  7.1);
  1306.             glRotatef(.1*angle + 180, 0, 1, 0);
  1307.             glScalef(.3,  .3,  .3);
  1308.             drawHelo((counter*9) % 360,  0);
  1309.         glPopMatrix();
  1310.         }
  1311.  
  1312.     if (killplanes > 0)
  1313.         {
  1314.         glPushMatrix();
  1315.             glTranslatef(0,  0,  7.1);
  1316.             glRotatef(.1*angle, 0, 1, 0);
  1317.             glScalef(.75,  .75,  .75);
  1318.             drawAirplane((counter*2) % 360);
  1319.         glPopMatrix();
  1320.         }
  1321.  
  1322.     if (killmechags > 0)
  1323.         {
  1324.         glPushMatrix();
  1325.             glTranslatef(0.6,  -.6,  7.1);
  1326.             glRotatef(.1*angle + 90, 0, 1, 0);
  1327.             glScalef(.25,  .25,  .25);
  1328.             drawMechaMonster(50, counter, detail);
  1329.         glPopMatrix();
  1330.         }
  1331.  
  1332.     if (killCHHs > 0)
  1333.         {
  1334.         glPushMatrix();
  1335.             glTranslatef(-0.1,  -.8,  7.1);
  1336.             glRotatef(.1*angle + 180, 0, 1, 0);
  1337.             glScalef(.3,  .3,  .3);
  1338.             makeCHH(20);
  1339.         glPopMatrix();
  1340.         }
  1341.  
  1342.     if (killheros > 0)
  1343.         {
  1344.         glPushMatrix();
  1345.             glTranslatef(-.6,  -.61,  7.1);
  1346.             glRotatef(.1*angle + 180, 0, 1, 0);
  1347.             glScalef(.25,  .25,  .25);
  1348.             drawHeroDude2(100, counter, 0, 0, detail);
  1349.         glPopMatrix();
  1350.         }
  1351.  
  1352.     glPopAttrib();
  1353.  
  1354.     glLineWidth(lineWidthNow);
  1355.     }
  1356.