home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 030.lha / Ogre / ogrestat.c < prev    next >
C/C++ Source or Header  |  1986-11-10  |  2KB  |  101 lines

  1. #include "ext.h"
  2.  
  3. disp_ogre_status(redraw)
  4. int redraw;
  5. {
  6.    static OGRE last;
  7.    char s[80];
  8.  
  9.    if (redraw || last.main_bats != ogre.main_bats)
  10.       if (ogre.main_bats > 0)
  11.       {
  12.          sprintf(s, "Main Batteries:      %d (4/3 D4)", ogre.main_bats);
  13.          movecur(18, 0);
  14.          eeol(18);
  15.          Amiga_puts(s);
  16.       }
  17.       else
  18.       {
  19.          movecur(18, 0);
  20.          eeol(18);
  21.          Amiga_puts(" ");
  22.       }
  23.  
  24.    if (redraw || last.sec_bats != ogre.sec_bats)
  25.       if (ogre.sec_bats > 0)
  26.       {
  27.          sprintf(s, "Secondary Batteries: %d (3/2 D3)", ogre.sec_bats);
  28.          movecur(19, 0);
  29.          eeol(19);
  30.          Amiga_puts(s);
  31.       }
  32.       else
  33.       {
  34.          movecur(19, 0);
  35.          eeol(19);
  36.          Amiga_puts(" ");
  37.       }
  38.  
  39.    if (redraw || last.missiles != ogre.missiles)
  40.       if (ogre.missiles > 0)
  41.       {
  42.          sprintf(s, "Missiles:            %d (6/5 D3)", ogre.missiles);
  43.          movecur(20, 0);
  44.          eeol(20);
  45.          Amiga_puts(s);
  46.       }
  47.       else
  48.       {
  49.          movecur(20, 0);
  50.          eeol(20);
  51.          Amiga_puts(" ");
  52.       }
  53.  
  54.    if (redraw || last.ap != ogre.ap)
  55.       if (ogre.ap > 0)
  56.       {
  57.          sprintf(s, "Anti-Personnel:      %d (1/1 D1)", ogre.ap);
  58.          movecur(21, 0);
  59.          eeol(21);
  60.          Amiga_puts(s);
  61.       }
  62.       else
  63.       {
  64.          movecur(21, 0);
  65.          eeol(21);
  66.          Amiga_puts(" ");
  67.       }
  68.  
  69.    if (redraw || last.treads != ogre.treads)
  70.       if (ogre.treads > 0)
  71.       {
  72.          sprintf(s, "Treads:              %d (1/* D1)",
  73.              ogre.treads);
  74.          movecur(22, 0);
  75.          eeol(22);
  76.          Amiga_puts(s);
  77.          movecur(22, 40);
  78.          sprintf(s, "Movement: %d",ogre.movement);
  79.          Amiga_puts(s);
  80.       }
  81.       else
  82.       {
  83.          movecur(22, 0);
  84.          eeol(22);
  85.          Amiga_puts(" ");
  86.       }
  87.  
  88. /*      if (redraw || last.movement != ogre.movement)
  89.       {
  90.          sprintf(s, "Movement:            %d", ogre.movement);
  91.          movecur(23, 0);
  92.          eeol(23);
  93.          Amiga_puts(s);
  94.       }
  95. */
  96.       /* Lattice allows structure copying! */
  97.  
  98.       last = ogre;
  99. }
  100.  
  101.