Skip to content

Commit

Permalink
Showing Duration level, & number of missions flown by each 'naut
Browse files Browse the repository at this point in the history
  • Loading branch information
peyre committed Jun 29, 2010
1 parent 1dc6a19 commit 56a0902
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 45 deletions.
20 changes: 20 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2010-06-24 Leon Baradat <[email protected]>

* V238

* ast0.c: Satellite Building now shows current Duration level. 'Naut list in bottom left
of various windows now shows how many missions each crew member has flown.

* ast4.c: Capsule/Shuttle building now shows how many missions each crew member has flown.

* crew.c: Screen where you assign 'nauts to crews now shows how many missions each crew
member has flown.

* future.c: Future Missions screen now shows the date.

* admin.c, crew.c, endgame.c, mis_c.c, prefs.c, radar.c: Better centering in buttons.

* ast2.c: Esthetic touchup of Astronaut Complex / Cosmonaut Center.

* news.dat: Esthetic change.

2010-06-22 Krzysztof Kosciuszkiewicz <[email protected]>

* V237
Expand Down
6 changes: 3 additions & 3 deletions admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ void FileAccess(char mode)
PrintAt(218,42,"FUNCTIONS");
grSetColor(1);PrintAtKey(233,56,"LOAD",0);
grSetColor(1);PrintAtKey(233,70,"SAVE",0);
grSetColor(1);PrintAtKey(223,84,"MAIL SAVE",0);
grSetColor(1);PrintAtKey(226,98,"DELETE",0);
grSetColor(1);PrintAtKey(221,84,"MAIL SAVE",0);
grSetColor(1);PrintAtKey(227,98,"DELETE",0);
grSetColor(1);PrintAtKey(233,112,"PLAY",0);
grSetColor(1);PrintAtKey(233,126,"QUIT",0);
grSetColor(1);PrintAtKey(234,126,"QUIT",0);

done=BarB=now=0;
ShBox(39,52+BarB*8,189,60+BarB*8);
Expand Down
22 changes: 20 additions & 2 deletions ast0.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <externs.h>

char MCol[110],sel[25],MaxSel;
int missions; // Variable for how many missions each 'naut has flown

void Moon(char plr)
{
Expand Down Expand Up @@ -103,6 +104,11 @@ void DispLeft(char plr,int lc,int cnt,int nw,int *ary)
if (Data->P[plr].Pool[ary[i]].RDelay>0) grSetColor(7);
// Print name in purple if 'naut has announced retirement (black shows poorly here) -Leon
PrintAt(28,136+(i-start)*8,&Data->P[plr].Pool[ary[i]].Name[0]);
if (Data->P[plr].Pool[ary[i]].Missions>0)
{
missions=Data->P[plr].Pool[ary[i]].Missions;
PrintAt(0,0," (");DispNum(0,0,missions);PrintAt(0,0,")");
}
}
}
return;
Expand Down Expand Up @@ -214,7 +220,19 @@ void SatText(char plr)
if (i!=2) {
grSetColor(11);
switch(i) {
case 0: PrintAt(5+i*80,80,"DOCKING");
case 0: PrintAt(5+i*80,80,"DUR LVL: "); // Show highest Duration level achieved -Leon
switch(Data->P[plr].DurLevel)
{
case 1:PrintAt(0,0,"A");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,"NONE");break;
}

PrintAt(5+i*80,94,"DOCKING");

if (Data->P[plr].Misc[4].Num>=0)
DispNum(5+i*80,110,Data->P[plr].Misc[4].Safety);
Expand Down Expand Up @@ -413,7 +431,7 @@ void LMBld(char plr)
PrintAt(m+48,130,"AVOID FAILURE: ");
grSetColor(11);
if (Data->P[plr].Manned[5+i].SaveCard>0) PrintAt(m+124,130,"YES");
else PrintAt(m+125,130,"NO");
else PrintAt(m+126,130,"NO");
grSetColor(6);PrintAt(m,138,"SAFETY FACTOR: ");
grSetColor(1);DispNum(0,0,(Data->P[plr].Manned[5+i].Num>=0) ? Data->P[plr].Manned[5+i].Safety : 0 );
PrintAt(0,0,"%");
Expand Down
12 changes: 6 additions & 6 deletions ast2.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,13 @@ void LimboText(char plr,int astro)
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,60,119,3);grSetColor(11);
RectFill(49,112,80,119,3);grSetColor(11);
switch (Data->P[plr].Pool[astro].Group) {
case 0: PrintAt(51,118,"I");break;
case 1: PrintAt(51,118,"II");break;
case 2: PrintAt(51,118,"III");break;
case 3: PrintAt(51,118,"IV");break;
case 4: PrintAt(51,118,"V");break;
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(128,79,145,92,3);
Expand Down
31 changes: 22 additions & 9 deletions ast4.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ int ALSpec(int att)
}
#endif

int missions; // Variable for how many missions each 'naut has flown
static char program; /* Variable to store prog data for "Draws Astronaut attributes" section: 1=Mercury/Vostok...5=Jupiter/Kvartet */
int retdel; /* Variable to store whether a given 'naut has announced retirement */
int sex; /* Variable to store a given 'naut sex */
Expand Down Expand Up @@ -1027,27 +1028,31 @@ void NewAstList(char plr,char prog,int M1,int M2,int M3,int M4)
{
retdel=Data->P[plr].Pool[M1-1].RDelay; // Sets whether 'naut has announced retirement
sex=Data->P[plr].Pool[M1-1].Sex; // Sets whether 'naut is male or female
missions=Data->P[plr].Pool[M1-1].Missions;
AstNames(0,&Data->P[plr].Pool[M1-1].Name[0],Data->P[plr].Pool[M1-1].Mood);
AstStats(plr,0,M1-1);
}
else DrawPosition(prog,1);
if (M2>0) {
retdel=Data->P[plr].Pool[M2-1].RDelay; // Sets whether 'naut has announced retirement
sex=Data->P[plr].Pool[M2-1].Sex; // Sets whether 'naut is male or female
missions=Data->P[plr].Pool[M2-1].Missions;
AstNames(1,&Data->P[plr].Pool[M2-1].Name[0],Data->P[plr].Pool[M2-1].Mood);
AstStats(plr,1,M2-1);
}
else DrawPosition(prog,2);
if (M3>0) {
retdel=Data->P[plr].Pool[M3-1].RDelay; // Sets whether 'naut has announced retirement
sex=Data->P[plr].Pool[M3-1].Sex; // Sets whether 'naut is male or female
missions=Data->P[plr].Pool[M3-1].Missions;
AstNames(2,&Data->P[plr].Pool[M3-1].Name[0],Data->P[plr].Pool[M3-1].Mood);
AstStats(plr,2,M3-1);
}
else DrawPosition(prog,3);
if (M4>0) {
retdel=Data->P[plr].Pool[M4-1].RDelay; // Sets whether 'naut has announced retirement
sex=Data->P[plr].Pool[M4-1].Sex; // Sets whether 'naut is male or female
missions=Data->P[plr].Pool[M4-1].Missions;
AstNames(3,&Data->P[plr].Pool[M4-1].Name[0],Data->P[plr].Pool[M4-1].Mood);
AstStats(plr,3,M4-1);
}
Expand All @@ -1065,18 +1070,18 @@ void AstStats(char plr,char man,char num)
grSetColor(1);
y=91+man*9;
if (man==0) {grSetColor(11);} /* Highlight CA for command pilot */
PrintAt(113,y,"CA:");DispNum(0,0,Data->P[plr].Pool[num].Cap);
PrintAt(117,y,"CA:");DispNum(0,0,Data->P[plr].Pool[num].Cap);
grSetColor(1);
if (man==1 && program>1) {grSetColor(11);} /* Highlight LM for LM pilot */
PrintAt(137,y,"LM:");DispNum(0,0,Data->P[plr].Pool[num].LM);
PrintAt(141,y,"LM:");DispNum(0,0,Data->P[plr].Pool[num].LM);
grSetColor(1);
if (program==1 || ((program==2 || program==3 || program==4) && man==1) || (program==5 && man>1)) {grSetColor(11);} /* Highlight EV for EVA specialist */
PrintAt(161,y,"EV:");DispNum(0,0,Data->P[plr].Pool[num].EVA);
PrintAt(165,y,"EV:");DispNum(0,0,Data->P[plr].Pool[num].EVA);
grSetColor(1);
if ((program==2 && man==0) || ((program==3 || program==4) && man==2)) {grSetColor(11);} /* Highlight DO for docking specialist */
PrintAt(186,y,"DO:");DispNum(0,0,Data->P[plr].Pool[num].Docking);
PrintAt(190,y,"DO:");DispNum(0,0,Data->P[plr].Pool[num].Docking);
grSetColor(1); /* Never highlight EN skill */
PrintAt(211,y,"EN:");DispNum(0,0,Data->P[plr].Pool[num].Endurance);
PrintAt(215,y,"EN:");DispNum(0,0,Data->P[plr].Pool[num].Endurance);
return;
}

Expand All @@ -1103,10 +1108,18 @@ void AstNames(int man,char *name,char att)
if (retdel>0) grSetColor(0); // Show name in black if 'naut has announced retirement
if (sex==1 && retdel>0) grSetColor(7); // Show name in purple if 'naut is female AND has announced retirement
switch(man) {
case 0: PrintAt(17,91,&name[0]);break;
case 1: PrintAt(17,100,&name[0]);break;
case 2: PrintAt(17,109,&name[0]);break;
case 3: PrintAt(17,118,&name[0]);break;
case 0: PrintAt(17,91,&name[0]);
if (missions>0) { PrintAt(0,0," (");DispNum(0,0,missions);PrintAt(0,0,")"); }
break;
case 1: PrintAt(17,100,&name[0]);
if (missions>0) { PrintAt(0,0," (");DispNum(0,0,missions);PrintAt(0,0,")"); }
break;
case 2: PrintAt(17,109,&name[0]);
if (missions>0) { PrintAt(0,0," (");DispNum(0,0,missions);PrintAt(0,0,")"); }
break;
case 3: PrintAt(17,118,&name[0]);
if (missions>0) { PrintAt(0,0," (");DispNum(0,0,missions);PrintAt(0,0,")"); }
break;
default: break;
};
if (att>=65) col=16;
Expand Down
6 changes: 5 additions & 1 deletion crew.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
extern struct mStr Mis;

int lenprogname; // Variable to hold and manipulate length of program name
int missions; // Variable for how many missions each 'naut has flown

int HardCrewAssign(char plr,char Pad,int MisType,char NewType)
{
Expand Down Expand Up @@ -189,7 +190,7 @@ int AsnCrew(char plr,char pad,char part)
PrintAt(100,16,"CANCEL");
grSetColor(9);PrintAt(184,16,"A");grSetColor(1);PrintAt(0,0,"SSIGN");
PrintAt(86,111,"MAKE ");grSetColor(9);PrintAt(0,0,"P");grSetColor(1);PrintAt(0,0,"RIMARY");
PrintAt(168,111,"MAKE ");grSetColor(9);PrintAt(0,0,"B");grSetColor(1);PrintAt(0,0,"ACKUP");
PrintAt(169,111,"MAKE ");grSetColor(9);PrintAt(0,0,"B");grSetColor(1);PrintAt(0,0,"ACKUP");
grSetColor(11);
if (part==0) PrintAt(105,31,"SELECT PRIMARY CREW");
else PrintAt(100,31,"SELECT SECONDARY CREW");
Expand Down Expand Up @@ -353,6 +354,9 @@ void FutAstList(char plr,char men,int M1,int M2,int M3,int M4)
if (Data->P[plr].Pool[m[i]-1].Sex==1) grSetColor(5); // Print name in blue if 'naut is female
if (Data->P[plr].Pool[m[i]-1].RDelay>0) grSetColor(3); // Print name in gray if 'naut has announced retirement (black doesn't show well here) -Leon
PrintAt(100,44+i*14,&Data->P[plr].Pool[m[i]-1].Name[0]);
missions=Data->P[plr].Pool[m[i]-1].Missions;
grSetColor(3);
PrintAt(0,0," (");DispNum(0,0,missions);PrintAt(0,0,")");
grSetColor(1);
RectFill(87,39+i*14,94,39+i*14,2); // Top
RectFill(87,39+i*14,87,44+i*14,2); // Left
Expand Down
6 changes: 3 additions & 3 deletions endgame.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ void Draw_NewEnd(char win)
IOBox(132,180,187,192);IOBox(192,180,247,192);IOBox(252,180,307,192);
grSetColor(1);
PrintAt(21,188,"HISTORY");PrintAt(85,188,"STATS");PrintAt(142,188,"PARADE");
PrintAt(198,188,"MOON EVA");PrintAt(268,188,"EXIT");
PrintAt(198,188,"MOON EVA");PrintAt(269,188,"EXIT");
FadeIn(0,pal,10,128,0);
Load_LenFlag(win);
FadeIn(1,pal,40,128,1);
Expand Down Expand Up @@ -517,8 +517,8 @@ void FakeWin(char win)
ShBox(0,24,319,199);RectFill(5,28,314,195,0);
RectFill(5,105,239,110,3);ShBox(101,102,218,113);
grSetColor(6);PrintAt(112,110,"ALTERNATE HISTORY");
if (win==0) DispBig(34,5,"US WINS",1,-1);
else DispBig(34,5,"USSR WINS",1,-1);
if (win==0) DispBig(36,5,"US WINS",1,-1);
else DispBig(36,5,"USSR WINS",1,-1);
FlagSm(win,4,4);
grSetColor(1);PrintAt(258,13,"CONTINUE");
r=random(100);
Expand Down
6 changes: 5 additions & 1 deletion future.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void DrawFuture(char plr,int mis,char pad)
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 instead -Leon
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;
Expand All @@ -177,6 +177,10 @@ void DrawFuture(char plr,int mis,char pad)
grSetColor(1);
PrintAt(9,80,"RESET");
PrintAt(258,13,"CONTINUE");
if (Data->Season==0) PrintAt(200,9,"SPRING");
else PrintAt(205,9,"FALL");
PrintAt(206,16,"19");
DispNum(0,0,Data->Year);
FlagSm(plr,4,4);
DispBig(40,5,"FUTURE MISSIONS",0,-1);
FadeIn(2,pal,10,0,0);
Expand Down
24 changes: 12 additions & 12 deletions mis_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ GuyDisp(int xa, int ya, struct Astros *Guy)
grSetColor(1);
assert(Guy != NULL);
if (Guy->Sex == 1)
grSetColor(18); // Display female 'nauts in blue, not white
grSetColor(18); // Display female 'nauts in blue, not white
PrintAt(xa, ya, Guy->Name);
PrintAt(0, 0, ": ");
switch (Guy->Status)
Expand Down Expand Up @@ -800,7 +800,7 @@ char FailureMode(char plr,int prelim,char *text)

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

// this destroy's what's in the current page frames
// this destroys what's in the current page frames
memcpy (save_screen, screen, 64000);
memcpy (save_pal, pal, 768);

Expand Down Expand Up @@ -841,15 +841,15 @@ char FailureMode(char plr,int prelim,char *text)
} else {
grSetColor(9);
switch(prelim) {
case 0: grSetColor(15);PrintAt(8,122,"ALL SYSTEMS ARE GO");break;
case 1: PrintAt(8,122,"FAILURE: USE ALTERNATE");break;
case 2: PrintAt(8,122,"FURTHER PROBLEMS: RECHECK");break;
case 4: PrintAt(8,122,"CREW STRANDED IN SPACE");break;
case 5: PrintAt(8,122,"MISSION FAILURE");break;
case 6: grSetColor(15);PrintAt(8,122,"MISSION SUCCESS");break;
case 7: PrintAt(8,122,"STEP FAILURE");break;
case 8: PrintAt(8,122,"CATASTROPHIC FAILURE");break;
case 9: PrintAt(8,122,"CREW INJURIES");break;
case 0: grSetColor(15);PrintAt(10,122,"ALL SYSTEMS ARE GO");break;
case 1: PrintAt(10,122,"FAILURE: USE ALTERNATE");break;
case 2: PrintAt(10,122,"FURTHER PROBLEMS: RECHECK");break;
case 4: PrintAt(10,122,"CREW STRANDED IN SPACE");break;
case 5: PrintAt(10,122,"MISSION FAILURE");break;
case 6: grSetColor(15);PrintAt(10,122,"MISSION SUCCESS");break;
case 7: PrintAt(10,122,"STEP FAILURE");break;
case 8: PrintAt(10,122,"CATASTROPHIC FAILURE");break;
case 9: PrintAt(10,122,"CREW INJURIES");break;
default: break;
};
};
Expand Down Expand Up @@ -904,7 +904,7 @@ char FailureMode(char plr,int prelim,char *text)

// Failure Diagram
InRFBox(162,28,312,42,10);
grSetColor(11);PrintAt(191,37,"EQUIPMENT DETAIL");
grSetColor(11);PrintAt(194,37,"EQUIPMENT DETAIL");

InRFBox(162,46,312,127,0); // Image is 188,49

Expand Down
4 changes: 2 additions & 2 deletions prefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ void DrawPrefs(int where,char a1,char a2)
grSetColor(5);
PrintAt(23,49,"COUNTRY");PrintAt(254,49,"COUNTRY");
PrintAt(17,101,"GAME LEVEL");PrintAt(247,101,"GAME LEVEL");
PrintAt(250,148,"ASTRONAUT");PrintAt(250,155,"SELECTION");
PrintAt(20,148,"ASTRONAUT");PrintAt(20,155,"SELECTION");
PrintAt(249,148,"COSMONAUT");PrintAt(250,155,"SELECTION");
PrintAt(19,148,"ASTRONAUT");PrintAt(20,155,"SELECTION");
grSetColor(1);PrintAt(258,13,"CONTINUE");
PrintAt(8,40,&Data->P[ Data->Def.Plr1 ].Name[0]);
PrintAt(238,40,&Data->P[ Data->Def.Plr2 ].Name[0]);
Expand Down
10 changes: 5 additions & 5 deletions radar.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ void PadDraw(char plr,char pad)
ShBox(56,64,110,74);InBox(57,65,109,73);
ShBox(4,180,162,195);InBox(6,182,160,193); //sched. duration
InBox(6,99,160,178);
grSetColor(9);PrintAt(15,190,"SCHEDULED DURATION: ");
grSetColor(9);PrintAt(18,190,"SCHEDULED DURATION: ");
grSetColor(7);
int MisCod;
MisCod=Data->P[plr].Mission[pad].MissionCode;
if ((MisCod>24 && MisCod<37) || MisCod==40 || MisCod==41 || MisCod==43 || MisCod==44 || MisCod>45)
// Show Duration level for manned missions with Duration steps (the Mission[pad].Duration variable
// will continue to show Duration level if mission is scrubbed or downgraded) - Leon
// Show Duration level for manned missions with Duration steps (this keeps the Mission[pad].Duration
// variable from continuing to show Duration level if mission is scrubbed or downgraded) - Leon
{
switch(Data->P[plr].Mission[pad].Duration)
{
Expand All @@ -71,7 +71,7 @@ void PadDraw(char plr,char pad)
{ PrintAt(0,0,"NONE"); }
}

grSetColor(7);PrintAt(64,71,"MISSION");
grSetColor(7);PrintAt(65,71,"MISSION");
FlagSm(plr,4,4);
if (Data->P[plr].LaunchFacility[pad]==1 && Data->P[plr].Mission[pad].MissionCode>0) PadPict(2+plr);
else if (Data->P[plr].LaunchFacility[pad]==1 && Data->P[plr].Mission[pad].MissionCode==0) PadPict(4+plr);
Expand Down Expand Up @@ -109,7 +109,7 @@ void PadDraw(char plr,char pad)
{
grSetColor(9);PrintAt(205,189,"F");grSetColor(1);PrintAt(0,0,"IX LAUNCH PAD");
}
DispBig(35,5,"LAUNCH FACILITY",0,-1);
DispBig(37,5,"LAUNCH FACILITY",0,-1);
switch(pad) {
case 0: DispBig(201,5,"A",0,-1);break;
case 1: DispBig(201,5,"B",0,-1);break;
Expand Down
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
237
238

0 comments on commit 56a0902

Please sign in to comment.