示例#1
0
void MisOrd(char num)
{
    int i, j = 0;

    ShBox(63, 19, 257, 173);
    InBox(74, 36, 246, 163);
    grSetColor(36);
    PrintAt(77, 30, "       LAUNCH ORDER");

    for (i = 0; i < num; i++) {
        InBox(78, 39 + 21 * j, 105, 55 + 21 * j);
        FlagSm(Order[i].plr, 79, 40 + 21 * j);
        grSetColor(34);
        PrintAt(110, 45 + 21 * j, "SCHEDULED LAUNCH");
        PrintAt(110, 52 + 21 * j, "DATE: ");
        grSetColor(1);

        PrintAt(0, 0,
                Month[Data->P[Order[i].plr].Mission[Order[i].loc].Month]);

        PrintAt(0, 0, " 19");
        DispNum(0, 0, Data->Year);
        j++;
    };

    FadeIn(2, pal, 10, 0, 0);

    WaitForMouseUp();

    WaitForKeyOrMouseDown();

    WaitForMouseUp();

    FadeOut(2, pal, 10, 0, 0);
}
示例#2
0
void Voltage(int voltage)
{
	DispNum(voltage,2,DISPTIME);
	PORTD=(1<<5)|(1<<6)|(0<<7);
	SevenSegment('V', 0);
	_delay_ms(DISPTIME*15);
	PORTD=(1<<5)|(1<<6)|(1<<7);
}
示例#3
0
void Current (int current)
{
	DispNum(current,2,DISPTIME);
	PORTD=(1<<5)|(1<<6)|(0<<7);
	SevenSegment('A', 0);
	_delay_ms(DISPTIME*15);
	PORTD=(1<<5)|(1<<6)|(1<<7);
}
int GetMinus(char plr)
{
 char i;int u;

 i=PrestMin(plr);
  RectFill(206,36,235,44,7);
 if (i<3) u=1; //ok
   else if (i<9) u=10; //caution
	else u=19; //danger
  gxVirtualDisplay(&vh,203,u,203,24,238,31,0);
 grSetColor(11);
 if (i>0) PrintAt(210,42,"-");
  else grMoveTo(210,42);
 DispNum(0,0,i);
 grSetColor(1);
 return 0;
}
示例#5
0
void AI_Begin(char plr)
{
    int i;
    FILE *fin;
    int32_t len[2];


    for (i = 0; i < 768; i++) {
        pal[i] = 0;
    }

    fin = sOpen("TURN.BUT", "rb", 0);
    fread(&pal, 768, 1, fin);
    len[0] = fread(screen, 1, MAX_X * MAX_Y, fin);
    fclose(fin);
    RLED_img((char *)screen, vhptr.vptr, (unsigned int)len[0],
             vhptr.w, vhptr.h);

    gxClearDisplay(0, 0);
    ShBox(0, 60, 319, 80);
    grSetColor(6 + plr * 3);

    if (plr == 0) {
        DispBig(15, 64, "DIRECTOR OF THE UNITED STATES", 0, -1);
    } else {
        DispBig(30, 64, "CHIEF DESIGNER OF THE USSR", 0, -1);
    }

    grSetColor(11);
    grMoveTo(175, 122);

    if (Data->Season == 0) {
        PrintAt(0, 0, "SPRING 19");
    } else {
        PrintAt(0, 0, "FALL 19");
    }

    DispNum(0, 0, Data->Year);
    gxVirtualDisplay(&vhptr, 1 + 110 * plr, 1, 30, 85, 30 + 107, 85 + 93, 0);
    grSetColor(11);
    PrintAt(60, 58, "COMPUTER TURN:  THINKING...");
    music_start(M_SOVTYP);
    FadeIn(2, pal, 10, 0, 0);
    colss = 0;
}
void LimboText(char plr,int astro)
{
   RectFill(44,31,145,40,3);grSetColor(11);
    int col;
    if (Data->P[plr].Pool[astro].Mood>=65) col=16;
    if (Data->P[plr].Pool[astro].Mood<65 && Data->P[plr].Pool[astro].Mood>=40) col=11;
    if (Data->P[plr].Pool[astro].Mood<40 && Data->P[plr].Pool[astro].Mood>=20) col=8;
    if (Data->P[plr].Pool[astro].Mood<20) col=0;
    if (Data->P[plr].Pool[astro].Mood==0) col=3;
    grSetColor(col);  // Print name in green/yellow/red/black depending on mood -Leon
   if (Data->P[plr].Pool[astro].RDelay>0) grSetColor(0);  // Print name in black if 'naut has announced retirement (override mood) -Leon
   PrintAt(46,37,Data->P[plr].Pool[astro].Name);
   grSetColor(11);
   RectFill(49,112,80,119,3);grSetColor(11);
   switch (Data->P[plr].Pool[astro].Group) {
      case 0: PrintAt(53,118,"I");break;
      case 1: PrintAt(53,118,"II");break;
      case 2: PrintAt(53,118,"III");break;
      case 3: PrintAt(53,118,"IV");break;
      case 4: PrintAt(53,118,"V");break;
      }                           
   RectFill(123,62,145,77,3);
   RectFill(125,79,145,85,3);
   RectFill(131,86,145,92,3);
   RectFill(123,95,145,101,3);
   RectFill(130,54,155,61,3);
    grSetColor(col); // Print mood in green/yellow/red/black depending on mood -Leon
   DispNum(132,60,Data->P[plr].Pool[astro].Mood);
    grSetColor(11);
   DispNum(125,68,Data->P[plr].Pool[astro].Cap);
   DispNum(123,76,Data->P[plr].Pool[astro].LM); 
   DispNum(125,84,Data->P[plr].Pool[astro].EVA); 
   DispNum(131,92,Data->P[plr].Pool[astro].Docking); 
   DispNum(125,100,Data->P[plr].Pool[astro].Endurance); 
   RectFill(127,113,141,120,3);grSetColor(11);
   DispNum(130,118,Data->P[plr].Pool[astro].Active);
   AstFaces(plr,10,52,Data->P[plr].Pool[astro].Face);
   return;
}
void DrawFuture(char plr,int mis,char pad)
{
  int i,j;
  FILE *fin;
  unsigned sz;
  strcpy(IKEY,"k011");strcpy(IDT,"i011");
  
  JointFlag=0; // initialize joint flag
  F1=F2=F3=F4=FMen=F5=0;
  for (i=0;i<5;i++) lck[i]=status[i]=0;
  FadeOut(2,pal,10,0,0);
  Load_FUT_BUT();
  fin=sOpen("FMIN.IMG","rb",0);
  fread(&pal[0],768,1,fin);
  sz=fread(screen,1,MAX_X*MAX_Y,fin);
  fclose(fin);
  RLED_img((char *)screen,(char *)vhptr.vptr,sz,vhptr.w,vhptr.h);
  gxClearDisplay(0,0);

  gr_sync ();

    if (pad==2) JointFlag=0; // third pad automatic no joint mission
    else
      if (Data->P[plr].LaunchFacility[pad+1] == 1)
      {
       if (Data->P[plr].Future[pad+1].MissionCode==0) JointFlag=1; // if no mission then set joint flag
	  else if (Data->P[plr].Future[pad+1].part==1) // check if the part of that second mission is set
		 {
		  JointFlag=1;
		  Data->P[plr].Future[pad+1].MissionCode=0; // clear mission
		  Data->P[plr].Future[pad+1].part=0;
		 };
      };

  if (pad==1 || pad==0) {
    if (Data->P[plr].LaunchFacility[pad+1]==1) JointFlag=1;
  }

  i=Data->Year;j=Data->Season;
  TRACE3("--- Setting i=Year (%d), j=Season (%d)", i, j);
  if ((i==60 && j==0) || (i==62 && j==0) || (i==64 && j==0) ||
      (i==66 && j==0) || (i==69 && j==1) || (i==71 && j==1) ||
      (i==73 && j==1)) {

     gxVirtualVirtual(&vhptr,1,2,12,11,&vhptr,198,153,gxSET); /* Mars */
     MarFlag=1; } else MarFlag=0;
  if ((i==60 || i==64 || i==68 || i==72 || i==73 || i==77)) {
    gxVirtualVirtual(&vhptr,14,2,64,54,&vhptr,214,130,gxSET); /* Jup */
    JupFlag=1; } else JupFlag=0;
  if (i==61 || i==66 || i==72) {
    gxVirtualVirtual(&vhptr,66,2,114,53,&vhptr,266,135,gxSET); /* Sat */
    SatFlag=1; } else SatFlag=0;

  RectFill(1,1,318,21,3);RectFill(317,22,318,198,3);RectFill(1,197,316,198,3);
  RectFill(1,22,2,196,3);OutBox(0,0,319,199);InBox(3,3,30,19);
  InBox(3,22,316,196);
  IOBox(242,3,315,19);
  ShBox(5,24,183,47);
  ShBox(5,24,201,47); //name box
  ShBox(5,74,41,82); // RESET
  ShBox(5,49,53,72); //dur/man
  ShBox(43,74,53,82); // lock
  ShBox(80,74,90,82);
  ShBox(117,74,127,82);
  ShBox(154,74,164,82);
  ShBox(191,74,201,82);
  ShBox(5,84,16,130);   //arrows up
  ShBox(5,132,16,146); //middle box
  ShBox(5,148,16,194);   //    down
  ShBox(203,24,238,31);  // new right boxes
  RectFill(206,36,235,44,7);
  ShBox(203,33,238,47);
  InBox(205,35,236,45);
  UPArrow(8,95);DNArrow(8,157);
  
  gxVirtualDisplay(&vh,140,5,5,132,15,146,0);
  Toggle(5,1);draw_Pie(0);OutBox(5,49,53,72);
  Toggle(1,1);TogBox(55,49,0);
  Toggle(2,1);TogBox(92,49,0);
  Toggle(3,1);TogBox(129,49,0);

  FMen=F1=F2=F3=F4=F5=0;
  for (i=1;i<4;i++){
    if (status[i]!=0) {
      Toggle(i,1);
    }
  };
	 if (JointFlag==0) {
      F4=2;lck[4]=1;
      Toggle(4,1);
      InBox(191,74,201,82);
      PlaceRX(5);
      TogBox(166,49,1);
    }
	 else {
      F4=0; lck[4]=0;
      status[4]=0;
      Toggle(4,1);
      OutBox(191,74,201,82);
      ClearRX(5);
      TogBox(166,49,0);
    };

  gr_sync ();
  Missions(plr,8,37,mis,1);
  GetMinus(plr);
  grSetColor(5);
  /* lines of text are 1:8,30  2:8,37   3:8,44    */
  switch(pad) { // These used to say Pad 1, 2, 3  -Leon
    case 0: PrintAt(8,30,"PAD A:");break;
    case 1: PrintAt(8,30,"PAD B:");break;
    case 2: PrintAt(8,30,"PAD C:");break;
    default:break;
  };
  grSetColor(1);
  PrintAt(9,80,"RESET");
  PrintAt(256,13,"CONTINUE");
  grSetColor(11);
   if (Data->Season==0) PrintAt(200,9,"SPRING");
   else PrintAt(205,9,"FALL");
   PrintAt(206,16,"19");
   DispNum(0,0,Data->Year);
  grSetColor(1);
  FlagSm(plr,4,4);
  DispBig(40,5,"FUTURE MISSIONS",0,-1);
  FadeIn(2,pal,10,0,0);
  
  return;
}
/** Missions() will draw the future missions among other things
 * 
 * \param plr Player
 * \param X screen coord for mission name string
 * \param Y screen coord for mission name string
 * \param val mission number
 * \param bub if set to 0 or 3 the function will not draw stuff
 */
void Missions(char plr,int X,int Y,int val,char bub)
{
  TRACE5("->Missions(plr, X %d, Y %d, val %d, bub %c)", X, Y, val, bub);
  
  if (bub==1 || bub==3) {
    PianoKey(val);
    Bub_Count=0;   // set the initial bub_count
    ClearDisplay();
    RectFill(6,31,182,46,3);
    RectFill(80,25,175,30,3);grSetColor(5);
    PrintAt(55,30,"TYPE: ");DispNum(0,0,val);
    grSetColor(5);
    if (V[val].E>0) {
      if (F5 > V[val].E && Mis.Dur==1) DurPri(F5);
	     else DurPri(V[val].E);}
	      else DurPri(F5);
  } else grSetColor(1);
  MissionName(val,X,Y,24);
  if (bub==3) GetMinus(plr);
  if (bub==0 || bub==3) {return;}
  
    
	MSteps=sOpen("missSteps.dat","r",FT_DATA);
	if (fgets(missStep, 1024, MSteps) == NULL)
		memset (missStep, 0, sizeof missStep);

	while (!feof(MSteps)&&((missStep[0]-0x30)*10+(missStep[1]-0x30))!=val) {
		if (fgets(missStep, 1024, MSteps) == NULL)
			break;
	}
	fclose(MSteps);

  int n;
	for (n=2;missStep[n]!='Z';n++)
		switch (missStep[n]) {
			case 'A': Draw_IJ	(B_Mis(++n));	break;
			case 'B': Draw_IJV	(B_Mis(++n));	break;
			case 'C': OrbOut	(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3));	n+=3;	break;
			case 'D': LefEarth	(B_Mis(n+1),B_Mis(n+2));	n+=2; 	break;
			case 'E': OrbIn		(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3));	n+=3; 	break;
			case 'F': OrbMid	(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3),B_Mis(n+4));	n+=4;	break;
			case 'G': LefOrb	(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3),B_Mis(n+4));	n+=4;	break;
			case 'H': Draw_LowS	(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3),B_Mis(n+4),B_Mis(n+5),B_Mis(n+6));	n+=6;	break;
			case 'I': Fly_By	();		break;
			case 'J': VenMarMerc	(B_Mis(++n));	break;
			case 'K': Draw_PQR	();		break;
			case 'L': Draw_PST	();		break;
			case 'M': Draw_GH	(B_Mis(n+1),B_Mis(n+2));	n+=2;	break;
			case 'N': Q_Patch	();		break;
			case 'O': RghtMoon	(B_Mis(n+1),B_Mis(n+2));	n+=2; 	break;
			case 'P': DrawLunPas	(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3),B_Mis(n+4));	n+=4;	break;
			case 'Q': DrawLefMoon	(B_Mis(n+1),B_Mis(n+2)); 	n+=2;	break;
			case 'R': DrawSTUV	(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3),B_Mis(n+4));	n+=4;	break;
			case 'S': Draw_HighS	(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3));	n+=3;	break;
			case 'T': DrawMoon	(B_Mis(n+1),B_Mis(n+2),B_Mis(n+3),B_Mis(n+4),B_Mis(n+5),B_Mis(n+6),B_Mis(n+7));	n+=7;	break;
			case 'U': LefGap	(B_Mis(++n));	break;
			case 'V': S_Patch	(B_Mis(++n));	break;
			case 'W': DrawZ		();		break;
			default : break;
		}
  gr_sync ();
  MissionCodes(plr,MisType,Pad);
  TRACE1("<-Missions()");
}  // end function missions
示例#9
0
void DrawReview(char plr)
{
    int clr, i, cte, P_value;
    char Fired_Flag = 0, Reset_Flag = 0;

    if (Data->P[plr].PresRev[0] != 0x7F) {
        FadeOut(2, pal, 10, 0, 0);
    }

    PortPal(plr);
    gxClearDisplay(0, 0);

    if (Data->P[plr].PresRev[0] == 0x7F) {
        Fired_Flag = 1;
        Data->P[plr].PresRev[0] = 16;
    } else if (Data->P[plr].PresRev[0] >= 16) {
        Reset_Flag = 1;
        Data->P[plr].PresRev[0] = 15;
    }

    ShBox(0, 0, 319, 22);
    ShBox(0, 24, 319, 199);
    FlagSm(plr, 4, 4);
    RectFill(5, 28, 314, 195, 0);
    RectFill(5, 122, 314, 195, 0);
    ShBox(6, 123, 313, 194);
    RectFill(7, 124, 312, 193, 9);
    InBox(11, 128, 307, 189);
    RectFill(12, 129, 306, 188, 7);
    ShBox(6, 29, 177, 121);
    ShBox(179, 29, 313, 121);
    InBox(182, 32, 309, 117);
    InBox(3, 3, 30, 19);
    IOBox(243, 3, 316, 19);

    if (plr == 0) {
        DispBig(40, 5, "PRESIDENTIAL REVIEW", 0, -1);
    } else {
        DispBig(40, 5, "POLITBURO REVIEW", 0, -1);
    }

    grSetColor(1);
    PrintAt(257, 13, "CONTINUE");
    grSetColor(1);
    PrintAt(59, 36, "JOB PERFORMANCE");
    grSetColor(6);
    PrintAt(8, 46, "GOOD");
    grSetColor(1);
    PrintAt(8, 77, "FAIR");
    grSetColor(9);
    PrintAt(8, 109, "POOR");
    grSetColor(1);
    DispNum(154, 117, Data->Year - 1);
    DispNum(126, 117, Data->Year - 2);
    DispNum(97, 117, Data->Year - 3);
    DispNum(70, 117, Data->Year - 4);
    DispNum(42, 117, Data->Year - 5);
    RectFill(32, 39, 172, 111, 0);
    GradRect(33, 39, 171, 74, 0);
    GradRect(33, 75, 171, 110, 0);
    grSetColor(3);
    pline(60, 40, 60, 110);
    pline(88, 40, 88, 110);
    pline(116, 40, 116, 110);
    pline(144, 40, 144, 110);
    pline(33, 48, 171, 48);
    pline(33, 57, 171, 57);
    pline(33, 66, 171, 66);
    pline(33, 75, 171, 75);
    pline(33, 84, 171, 84);
    pline(33, 93, 171, 93);
    pline(33, 102, 171, 102);
    InBox(32, 39, 172, 111);

    for (i = 0; i < 5; i++) if (Data->P[plr].PresRev[i] > 16) {
            Data->P[plr].PresRev[i] = 16;
        }

    for (i = 0; i < 5; i++) {
        cte = 0;

        if (Data->P[plr].PresRev[i] < 8) {
            if (Data->P[plr].PresRev[i] == 7) {
                cte = 73;
            } else {
                cte = 40 + Data->P[plr].PresRev[i] * 5;
            }
        } else if (Data->P[plr].PresRev[i] > 8) {
            if (Data->P[plr].PresRev[i] == 9) {
                cte = 77;
            } else {
                cte = 80 + (Data->P[plr].PresRev[i] - 10) * 5;
            }
        };

        if (Data->P[plr].PresRev[i] == 8) {
            cte = 73;
        }

        RectFill(166 - i * 28, 75, 151 - i * 28, cte, 5 + ((Data->P[plr].PresRev[i] <= 8) ? 0 : 3));
        grSetColor(6 + ((Data->P[plr].PresRev[i] <= 8) ? 0 : 3));
        pline(167 - i * 28, 75, 167 - i * 28, cte);
    }

    if (Fired_Flag == 1) {
        clr = 0;

        for (i = 0; i < Data->P[plr].AstroCount; i++)
            if (Data->P[plr].Pool[i].Status == AST_ST_DEAD) {
                clr++;
            }

        Data->P[plr].PresRev[0] = (clr >= 2) ? 17 : 16;
    }

    DrawRevText(plr, Data->P[plr].PresRev[0]);

    if (Data->P[plr].PresRev[0] == 17) {
        Data->P[plr].PresRev[0] = 16;
    }

    P_value = 0;

    // 0 pres. 1 v.p.
    if (plr == 0) {
        if (Data->P[plr].PresRev[0] <= 4 || Data->P[plr].PresRev[0] >= 11) {
            P_value = 0;
        } else {
            P_value = 1;
        }
    };

    if (plr == 1) {
        if (Data->P[plr].PresRev[0] <= 4 || Data->P[plr].PresRev[0] >= 12) {
            P_value = 0;
        } else {
            P_value = 1;
        }
    }

    if (plr == 0) {
        if (Data->Year <= 60) {
            if (P_value == 0) {
                PresPict(0);
            } else {
                PresPict(1);
            }
        } else if (Data->Year >= 61 && Data->Year <= 63) {
            if (P_value == 0) {
                PresPict(2);
            } else {
                PresPict(3);
            }
        } else if (Data->Year >= 64 && Data->Year <= 68) {
            if (P_value == 0) {
                PresPict(4);
            } else {
                PresPict(5);
            }
        } else if (Data->Year >= 69 && Data->Year <= 73) {
            if (P_value == 0) {
                PresPict(6);
            } else {
                PresPict(7);
            }
        } else if (Data->Year >= 74 && Data->Year <= 76) {
            if (P_value == 0) {
                PresPict(8);
            } else {
                PresPict(9);
            }
        } else if (Data->Year >= 77) {
            if (P_value == 0) {
                PresPict(10);
            } else {
                PresPict(11);
            }
        }
    }

    if (plr == 1) {
        if (Data->Year < 61) {
            if (P_value == 0) {
                PresPict(14);
            } else {
                PresPict(15);
            }
        } else if (Data->Year <= 64) {
            if (P_value == 0) {
                PresPict(12);
            } else {
                PresPict(13);
            }
        } else if (Data->Year >= 65) {
            if (P_value == 0) {
                PresPict(16);
            } else {
                PresPict(17);
            }
        }
    }

    if (Reset_Flag == 1) {
        Data->P[plr].PresRev[0] = 16;
    }

    FadeIn(2, pal, 10, 0, 0);

    return;
}
示例#10
0
void MisAnn(char plr, char pad)
{
    int i, j, bud;
    struct mStr Mis2;
    char k, hold, Digit[4], HelpFlag = 0;
    char pad_str[2] = {'A' + pad, '\0'};

    for (i = 0; i < 768; i++) {
        pal[i] = 0;
    }

    gxClearDisplay(0, 0);

    PortPal(plr);
    ShBox(41, 20, 281, 184);
    InBox(46, 25, 276, 179);
    InBox(46, 25, 117, 65);
    Flag(47, 26, plr);
    InBox(122, 25, 276, 65);
    grSetColor(9);
    PrintAt(127, 33, "SCHEDULED LAUNCH"); //was 154,33
    grSetColor(34);
    PrintAt(127, 40, "LAUNCH FACILITY: ");
    grSetColor(1);
    PrintAt(0, 0, "PAD ");
    PrintAt(0, 0, pad_str);
    grSetColor(34);
    PrintAt(127, 47, "DATE: ");
    grSetColor(1);

    PrintAt(0, 0, Month[Data->P[plr].Mission[pad].Month]);

    PrintAt(0, 0, "19");
    DispNum(0, 0, Data->Year);
    grSetColor(1);

    GetMisType(Data->P[plr].Mission[pad].MissionCode);
    memcpy(&Mis2, &Mis, sizeof Mis);


    if ((Mis.mVab[0] & 0x10) == 0x10 && Data->P[plr].DMod <= 0) {
        i = 0;

        while (dg[Mis2.Index][i] != 0 && Mis.Doc == 1) {
            GetMisType(dg[Mis2.Index][i]);
            i++;
        }

        if (dg[Mis2.Index][i] == 0) {
            Data->P[plr].Mission[pad].MissionCode = 4;    // new mission
        } else {
            Data->P[plr].Mission[pad].MissionCode = Mis.Index;    // new mission
        }

        GetMisType(Data->P[plr].Mission[pad].MissionCode);
        HelpFlag = 1;
    }

    PrintAt(127, 54, Mis.Abbr);
    int MisCod;
    MisCod = Data->P[plr].Mission[pad].MissionCode;

    if ((MisCod > 24 && MisCod < 32) || MisCod == 33 || MisCod == 34 || MisCod == 35 || MisCod == 37 || MisCod == 40 || MisCod == 41)
        // Show duration level only on missions with a Duration step - Leon
    {
        switch (Data->P[plr].Mission[pad].Duration) {
        case 1:
            PrintAt(0, 0, "");
            break;

        case 2:
            PrintAt(0, 0, " (B)");
            break;

        case 3:
            PrintAt(0, 0, " (C)");
            break;

        case 4:
            PrintAt(0, 0, " (D)");
            break;

        case 5:
            PrintAt(0, 0, " (E)");
            break;

        case 6:
            PrintAt(0, 0, " (F)");
            break;

        default:
            PrintAt(0, 0, "");
            break;
        }
    }

    IOBox(57, 68, 118, 84);
    IOBox(131, 68, 197, 84);
    IOBox(205, 68, 266, 84);
    grSetColor(1);
    PrintAt(65, 78, "CONTINUE");
    PrintAt(139, 78, "PLAY FULL");
    PrintAt(221, 78, "SCRUB");
    grSetColor(9);
    MisCod = Data->P[plr].Mission[i].MissionCode;
    PrintAt(65, 78, "C");
    PrintAt(139, 78, "P");
    PrintAt(221, 78, "S");

    //IOBox(85,68,158,84);IOBox(172,68,245,84);
    //grSetColor(1);PrintAt(102,78,"CONTINUE");PrintAt(189,78,"SCRUB");
    //grSetColor(9);
    //PrintAt(102,78,"C");PrintAt(189,78,"S");

    if (Data->P[plr].Mission[pad].Joint == 0) {
        PrintAt(128, 91, "SINGLE LAUNCH");
    } else {
        PrintAt(131, 91, "JOINT LAUNCH");
        PrintAt(49, 101, "PART ONE");
        PrintAt(102, 101, "PAD ");

        //DispNum(0,0,pad);
        switch (pad) {
        case 0:
            PrintAt(0, 0, "A");
            break;

        case 1:
            PrintAt(0, 0, "B");
            break;

        case 2:
            PrintAt(0, 0, "C");
            break;
        };

        PrintAt(160, 101, "PART TWO");

        PrintAt(213, 101, "PAD ");

        //DispNum(0,0,pad+1);
        switch (pad + 1) {
        case 0:
            PrintAt(0, 0, "A");
            break;

        case 1:
            PrintAt(0, 0, "B");
            break;

        case 2:
            PrintAt(0, 0, "C");
            break;
        };

    }

    for (i = 0; i < Data->P[plr].Mission[pad].Joint + 1; i++) {
        k = 0;

        if (i == 0) {
            bud = 49;
        } else {
            bud = 160;
        }

        for (j = Mission_Capsule; j <= Mission_PrimaryBooster; j++) {
            hold = Data->P[plr].Mission[pad + i].Hard[j];

            switch (j) {
            case 0:
                if (hold > -1) {
                    grSetColor(7);
                    PrintAt(bud, 109 + 14 * k, "CAPSULE: ");
                    grSetColor(1);
                    PrintAt(0, 0, &Data->P[plr].Manned[hold].Name[0]);
                    grSetColor(11);
                    PrintAt(bud, 116 + 14 * k, "SAFETY FACTOR: ");
                    Data->P[plr].Manned[hold].Damage != 0 ? grSetColor(9) : grSetColor(1); //Damaged Equipment, Nikakd, 10/8/10
                    sprintf(&Digit[0], "%d", Data->P[plr].Manned[hold].Safety + Data->P[plr].Manned[hold].Damage);
                    PrintAt(0, 0, &Digit[0]);
                    PrintAt(0, 0, "%");
                    // PrintAt(144+i*111,116+14*k,"%");
                    ++k;
                };

                break;

            case 1:
                if (hold > -1) {
                    grSetColor(7);
                    PrintAt(bud, 109 + 14 * k, "KICKER: ");
                    grSetColor(1);
                    PrintAt(0, 0, &Data->P[plr].Misc[hold].Name[0]);
                    grSetColor(11);
                    PrintAt(bud, 116 + 14 * k, "SAFETY FACTOR: ");
                    Data->P[plr].Misc[hold].Damage != 0 ? grSetColor(9) : grSetColor(1); //Damaged Equipment, Nikakd, 10/8/10
                    sprintf(&Digit[0], "%d", Data->P[plr].Misc[hold].Safety + Data->P[plr].Misc[hold].Damage);
                    PrintAt(0, 0, &Digit[0]);
                    PrintAt(0, 0, "%");
                    // DispNum(0,0,Data->P[plr].Misc[hold].Safety);
                    //    PrintAt(144+i*111,116+14*k,"%");
                    ++k;
                };

                break;

            case 2:
                if (hold > -1) {
                    grSetColor(7);
                    PrintAt(bud, 109 + 14 * k, "LM: ");
                    grSetColor(1);
                    PrintAt(0, 0, &Data->P[plr].Manned[hold].Name[0]);
                    grSetColor(11);
                    PrintAt(bud, 116 + 14 * k, "SAFETY FACTOR: ");
                    Data->P[plr].Manned[hold].Damage != 0 ? grSetColor(9) : grSetColor(1); //Damaged Equipment, Nikakd, 10/8/10
                    sprintf(&Digit[0], "%d", Data->P[plr].Manned[hold].Safety + Data->P[plr].Manned[hold].Damage);
                    PrintAt(0, 0, &Digit[0]);
                    PrintAt(0, 0, "%");
                    //DispNum(0,0,Data->P[plr].Manned[hold].Safety);
                    //PrintAt(144+i*111,116+14*k,"%");
                    ++k;
                };

                break;

            case 3:
                if (hold > -1) {
                    if (hold < 3) {
                        grSetColor(7);
                        PrintAt(bud, 109 + 14 * k, "PROBE: ");
                        grSetColor(1);
                        PrintAt(0, 0, &Data->P[plr].Probe[hold].Name[0]);
                        grSetColor(11);
                        PrintAt(bud, 116 + 14 * k, "SAFETY FACTOR: ");
                        Data->P[plr].Probe[hold].Damage != 0 ? grSetColor(9) : grSetColor(1); //Damaged Equipment, Nikakd, 10/8/10
                        sprintf(&Digit[0], "%d", Data->P[plr].Probe[hold].Safety + Data->P[plr].Probe[hold].Damage);
                        PrintAt(0, 0, &Digit[0]);
                        PrintAt(0, 0, "%");
                        //DispNum(0,0,Data->P[plr].Probe[hold].Safety);
                        //PrintAt(144+i*111,116+14*k,"%");
                        ++k;
                    } else if (hold == 4) {
                        grSetColor(7);
                        PrintAt(bud, 109 + 14 * k, "DOCKING: ");
                        grSetColor(1);
                        PrintAt(0, 0, &Data->P[plr].Misc[hold].Name[0]);
                        grSetColor(11);
                        PrintAt(bud, 116 + 14 * k, "SAFETY FACTOR: ");
                        Data->P[plr].Misc[hold].Damage != 0 ? grSetColor(9) : grSetColor(1); //Damaged Equipment, Nikakd, 10/8/10
                        sprintf(&Digit[0], "%d", Data->P[plr].Misc[hold].Safety + Data->P[plr].Misc[hold].Damage);
                        PrintAt(0, 0, &Digit[0]);
                        PrintAt(0, 0, "%");
                        //DispNum(0,0,Data->P[plr].Misc[hold].Safety);
                        //PrintAt(144+i*111,116+14*k,"%");
                        ++k;
                    }
                };

                break;

            case 4:
                if (hold > -1) {
                    if (hold < 5) {
                        grSetColor(7);
                        PrintAt(bud, 109 + 14 * k, "ROCKET: ");
                        grSetColor(1);
                        PrintAt(0, 0, &Data->P[plr].Rocket[hold - 1].Name[0]);
                        grSetColor(11);
                        PrintAt(bud, 116 + 14 * k, "SAFETY FACTOR: ");
                        Data->P[plr].Rocket[hold - 1].Damage != 0 ? grSetColor(9) : grSetColor(1); //Damaged Equipment, Nikakd, 10/8/10
                        sprintf(&Digit[0], "%d", Data->P[plr].Rocket[hold - 1].Safety + Data->P[plr].Rocket[hold - 1].Damage);
                        PrintAt(0, 0, &Digit[0]);
                        PrintAt(0, 0, "%");
                        //DispNum(0,0,Data->P[plr].Rocket[hold-1].Safety);
                        //PrintAt(144+i*111,116+14*k,"%");
                        ++k;
                    } else {
                        grSetColor(7);
                        PrintAt(bud, 109 + 14 * k, "ROCKET: ");
                        grSetColor(1);
                        PrintAt(0, 0, &Data->P[plr].Rocket[hold - 5].Name[0]);
                        PrintAt(0, 0, " W/B");
                        grSetColor(11);
                        PrintAt(bud, 116 + 14 * k, "SAFETY FACTOR: ");
                        (Data->P[plr].Rocket[hold - 5].Damage != 0 || Data->P[plr].Rocket[4].Damage != 0) ? grSetColor(9) : grSetColor(1); //Damaged Equipment && Booster's Safety Mod, Nikakd, 10/8/10
                        sprintf(&Digit[0], "%d", RocketBoosterSafety(Data->P[plr].Rocket[hold - 5].Safety + Data->P[plr].Rocket[hold - 5].Damage, Data->P[plr].Rocket[4].Safety + Data->P[plr].Rocket[4].Damage));
                        PrintAt(0, 0, &Digit[0]);
                        PrintAt(0, 0, "%");
                        // DispNum(0,0,(Data->P[plr].Rocket[hold-5].Safety+Data->P[plr].Rocket[4].Safety)/2);
                        // PrintAt(144+i*111,116+14*k,"%");
                        ++k;
                    }
                }

                break;

            default:
                break;
            }
        }
    }

    FadeIn(2, pal, 10, 0, 0);


    WaitForMouseUp();

    if (HelpFlag) {
        Help("i156");    // Notification of being an Help
    }

    while (1) {
        key = 0;
        GetMouse();

        if ((x >= 59 && y >= 70 && x <= 116 && y <= 82 && mousebuttons > 0) || key == K_ENTER || key == 'C') {
            InBox(59, 70, 116, 82);
            WaitForMouseUp();
            OutBox(59, 70, 116, 82);
            FadeOut(2, pal, 10, 0, 0);
            BIG = 0;
            return;
        } else if ((x >= 133 && y >= 70 && x <= 195 && y <= 82 && mousebuttons > 0) || key == K_ENTER || key == 'P') {
            InBox(133, 70, 195, 82);
            WaitForMouseUp();
            OutBox(133, 70, 195, 82);
            FadeOut(2, pal, 10, 0, 0);
            BIG = 1;
            return;
        }

        else if ((x >= 207 && y >= 70 && x <= 264 && y <= 82 && mousebuttons > 0) || key == 'S') {
            InBox(207, 70, 264, 82);
            WaitForMouseUp();
            OutBox(207, 70, 264, 82);
            {
                ClrMiss(plr, pad);
            }

            if (Data->P[plr].Mission[pad].MissionCode == 0) {
                FadeOut(2, pal, 10, 0, 0);
                return;
            }
        }
    };
}