Skip to content

Commit

Permalink
Disabled Duration penalty system to bypass Duration B Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
peyre committed Aug 10, 2010
1 parent 3d089d3 commit db5c2d1
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 68 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2010-08-09 Leon Baradat <[email protected]>

* V240

* mc2.c, prest.c: Disabled Duration penalty system.

* admin.c, ast0.c, ast1.c, ast4.c, intel.c, mis_c.c: Esthetic changes.

2010-06-30 Leon Baradat <[email protected]>

* V239
Expand Down
36 changes: 18 additions & 18 deletions admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ int GenerateTables(SaveGameType saveType)
if (tFiles>0) {
tFiles=0;
done=first_saved_game(&ffblk);
while(!done && tFiles<100) // Get All Files Names And save Dates.
while(!done && tFiles<100) // Get All File Names And Save Dates.
{
if (strlen (ffblk.ff_name) > sizeof FList[tFiles].Name - 1)
goto next;
Expand Down Expand Up @@ -259,18 +259,18 @@ void FileAccess(char mode)

if (mode==0)
{
if (sc==0 || sc==2) IOBox(207,62,280,74); //Regular Save game
if (sc==0 || sc==2) IOBox(207,62,280,74); // Regular Save game
else InBox(207,62,280,74);
if (sc==1) IOBox(207,76,280,88); //Mail Save game
if (sc==1) IOBox(207,76,280,88); // Mail Save game
else InBox(207,76,280,88);
}
else {
InBox(207,62,280,74);
InBox(207,76,280,88);
}
if (tFiles>0) IOBox(207,90,280,102); else InBox(207,90,280,102); //Delete
IOBox(207,104,280,116); //Play
IOBox(207,118,280,130); //Quit
if (tFiles>0) IOBox(207,90,280,102); else InBox(207,90,280,102); // Delete
IOBox(207,104,280,116); // Play
IOBox(207,118,280,130); // Quit

grSetColor(11);
PrintAt(59,42,"TIME CAPSULE REQUEST");
Expand Down Expand Up @@ -358,7 +358,7 @@ void FileAccess(char mode)
RLED((char *) load_buffer,(char *)Data,SaveHdr->compSize);
free(load_buffer);

// Swap Players Data
// Swap Players' Data
if (endianSwap)
{
_SwapGameDat();
Expand Down Expand Up @@ -423,9 +423,9 @@ void FileAccess(char mode)

if (SaveHdr->Country[0]==8 || SaveHdr->Country[1]==9)
{
//Play-By-Mail save game LOAD
// Play-By-Mail save game LOAD
Option=-1;fOFF=-1;
//save file offset
// save file offset
fOFF=now;

Data->Season=SaveHdr->Season;
Expand Down Expand Up @@ -460,22 +460,22 @@ void FileAccess(char mode)
}
}
else
//Modem save game LOAD
// Modem save game LOAD
if (SaveHdr->Country[0]==6 || SaveHdr->Country[1]==7)
{
//Modem connect up
// Modem connect up
if (SaveHdr->Country[0]==6) {plr[0]=SaveHdr->Country[0];plr[1]=1;}
else {plr[1]=SaveHdr->Country[1];plr[0]=0;}
//Modem Play => reset the modem
// Modem Play => reset the modem
if (Option!=-1) DoModem(2);
Option=MPrefs(1);
//klugge
// klugge
if (Option==0 || Option==2) Option=0;
else if (Option==1 || Option==3) Option=1;
}
else
{
//Regular save game LOAD
// Regular save game LOAD
if (Data->Def.Input==0 || Data->Def.Input==2) { // Hist Crews
fin=sOpen("CREW.DAT","rb",0);
size=fread(buffer,1,BUFFER_SIZE,fin);
Expand Down Expand Up @@ -528,7 +528,7 @@ void FileAccess(char mode)
i--; // decrement to correct for the FOR loop
strcpy(SaveHdr->PName[0],Data->P[plr[0] % 2].Name);
strcpy(SaveHdr->PName[1],Data->P[plr[1] % 2].Name);
//Modem save game hack
// Modem save game hack
if (Option!=-1)
{
if (Option==0) {plr[0]=6;plr[1]=1;}
Expand Down Expand Up @@ -829,7 +829,7 @@ void FileAccess(char mode)
};


// WaitForMouseUp();
// WaitForMouseUp();
OutBox(191,89,202,126);
// perform Down Button
key=0;
Expand Down Expand Up @@ -1269,8 +1269,8 @@ char RequestX(char *s,char md)
IOBox(91,103,164,130);
InBox(92,58,243,97);
grSetColor(1);
DispBig(109,110,"YES",0,0);
DispBig(196,110,"NO",0,0);
DispBig(111,110,"YES",0,0);
DispBig(193,110,"NO",0,0);
grSetColor(11);
DispBig(166-i*10,65,&s[0],0,-1);
PrintAt(136,94,"ARE YOU SURE?");
Expand Down
10 changes: 5 additions & 5 deletions ast1.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ void DrawAstCheck(char plr)

if (ad==0) {
if (Data->P[plr].Cash<i) {
PrintAt(99,113,"YOU CANNOT AFFORD");
if (plr==0) PrintAt(100,122,"ASTRONAUTS THIS TURN");
else PrintAt(100,122,"COSMONAUTS THIS TURN");
PrintAt(110,113,"YOU CANNOT AFFORD");
if (plr==0) PrintAt(103,122,"ASTRONAUTS THIS TURN");
else PrintAt(103,122,"COSMONAUTS THIS TURN");
grSetColor(8);
PrintAt(113,143,"EXIT");
PrintAt(181,143,"EXIT");
Expand Down Expand Up @@ -335,7 +335,7 @@ DrawAstCheck(plr);

}
}
//else
// else
if (((x>=6 && y>=130 && x<=18 && y<=161 && mousebuttons>0) || (key==UP_ARROW && ksel==1)) && count>0)
{ /* Lft Up */
InBox(6,130,18,161);
Expand Down Expand Up @@ -599,7 +599,7 @@ DrawAstCheck(plr);
OutBox(168,111,313,123);
};

if ((x>=245 && y>=5 && x<=314 && y<=17 && mousebuttons>0) || key==K_ENTER) { /* Exit - not til done */
if ((x>=245 && y>=5 && x<=314 && y<=17 && mousebuttons>0) || key==K_ENTER) { /* Exit - not 'til done */
if (fem==1) {
j=0;
for (i=0;i<count;i++) if (Men[sel[i]].Sex==1) j++;
Expand Down
22 changes: 11 additions & 11 deletions ast4.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void AstLevel(char plr,char prog,char crew,char ast)


//RectFill(113,53,119,57,i); // shouldn't be mood
grSetColor(11); PrintAt(122,57,Data->P[plr].Pool[man].Name);
grSetColor(11); PrintAt(115,57,Data->P[plr].Pool[man].Name);
// don't do this for level three
PrintAt(0,0," M: ");DispNum(0,0,Data->P[plr].Pool[man].Mood);

Expand Down Expand Up @@ -256,7 +256,7 @@ void DrawProgs(char plr,char prog)
}

/** need to check programs to see if there are adequate astronauts there
* check any assigned groups yes then return
* check any assigned Cgroups yes then return
* check how many astronauts assigned to current prog
*
*
Expand Down Expand Up @@ -553,7 +553,7 @@ Programs(char plr, char prog)
DispLeft(plr, BarA, count, now2, &M[0]);
}
}
if (mousebuttons > 0 || key > 0) /* Game Play */
if (mousebuttons > 0 || key > 0) /* Gameplay */
{
if (((x >= 6 && y >= 130 && x <= 18 && y <= 161
&& mousebuttons > 0) || key == UP_ARROW)
Expand Down Expand Up @@ -904,7 +904,7 @@ Programs(char plr, char prog)
InBox(81, 70, 238, 113);
RectFill(82, 71, 237, 112, 7 + 3 * plr);
grSetColor(1);
DispBig(122, 50, "PROBLEM", 0, -1);
DispBig(118, 50, "PROBLEM", 0, -1);
PrintAt(136, 162, "CONTINUE");
grSetColor(11);
PrintAt(88, 80, "FLIGHT CREW ");
Expand Down Expand Up @@ -1018,9 +1018,9 @@ void ClearIt(void)
void NewAstList(char plr,char prog,int M1,int M2,int M3,int M4)
{

program=prog; /* Sets capsule/shuttle program for "Draws Astronaut attributes" section -Leon */
program=prog; /* Sets capsule/shuttle program for "Draws Astronaut attributes" section */
/* 1=Mercury/Vostok, 2=Gemini/Voskhod, 3=Apollo/Soyuz, 4=XMS-2/Lapot, 5=Jupiter/Kvartet */
/* This will be used to highlight the skills for each crew member's role */
/* This will be used to highlight the skills for each crew member's role -Leon */

RectFill(13,86,231,122,3); /* Clear Astro Area */
grSetColor(1);
Expand Down Expand Up @@ -1070,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(117,y,"CA:");DispNum(0,0,Data->P[plr].Pool[num].Cap);
PrintAt(119,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(141,y,"LM:");DispNum(0,0,Data->P[plr].Pool[num].LM);
PrintAt(143,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(165,y,"EV:");DispNum(0,0,Data->P[plr].Pool[num].EVA);
PrintAt(167,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(190,y,"DO:");DispNum(0,0,Data->P[plr].Pool[num].Docking);
PrintAt(192,y,"DO:");DispNum(0,0,Data->P[plr].Pool[num].Docking);
grSetColor(1); /* Never highlight EN skill */
PrintAt(215,y,"EN:");DispNum(0,0,Data->P[plr].Pool[num].Endurance);
PrintAt(217,y,"EN:");DispNum(0,0,Data->P[plr].Pool[num].Endurance);
return;
}

Expand Down
10 changes: 5 additions & 5 deletions intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ void BackIntel(char p,char year)
DispNum(0,0,Data->P[p].PastIntel[year].num);DispChr(Data->P[p].PastIntel[year].code);
PrintAt(0,0,"-");if (Data->Season==0) PrintAt(0,0,"S");else PrintAt(0,0,"F");
DispNum(0,0,58+year);
grSetColor(6);PrintAt(17,51,"CODENAME: ");grSetColor(1);xc=39;yc=59;
// CODENAME GOES HERE
grSetColor(6);PrintAt(17,51,"CODE NAME: ");grSetColor(1);xc=39;yc=59;
// CODE NAME GOES HERE
code=-1;
if (prg==0) code=ind;
else if (prg==1) code=ind+7;
Expand Down Expand Up @@ -580,7 +580,7 @@ void DrawBre(char plr)
ShBox(132,29,148,80);
ShBox(132,82,148,133);
ShBox(6,29,130,41);InBox(8,31,128,39); // code
ShBox(6,43,130,63);InBox(8,45,128,61); // codename
ShBox(6,43,130,63);InBox(8,45,128,61); // code name
ShBox(6,65,130,85);InBox(8,67,128,83); // class
ShBox(6,87,130,101);InBox(8,89,128,99); // crew
ShBox(6,103,130,118);InBox(8,105,128,116); // program
Expand Down Expand Up @@ -707,7 +707,7 @@ void ReButs(char old,char nw)

switch(old) {
case 0:OutBox(7,164,75,195);
gxVirtualDisplay(&but,0,0,8,165,74,194,0); // Unmanned
gxVirtualDisplay(&but,0,0,8,165,74,194,0); // Unmanned
break;
case 1:OutBox(83,164,156,195);
gxVirtualDisplay(&but,68,0,84,165,155,194,0); // Rocket
Expand All @@ -723,7 +723,7 @@ void ReButs(char old,char nw)
}
switch(nw) {
case 0:InBox(7,164,75,195);
gxVirtualDisplay(&but,0,31,8,165,74,194,0); // Unmanned
gxVirtualDisplay(&but,0,31,8,165,74,194,0); // Unmanned
break;
case 1:InBox(83,164,156,195);
gxVirtualDisplay(&but,68,31,84,165,155,194,0); // Rocket
Expand Down
18 changes: 9 additions & 9 deletions mc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void MissionSteps(char plr,int mcode,int Mgoto,int step,int pad)
if (MH[pad][1]!=NULL) Mev[step].Class=1; // Kicker
else if (MH[pad][0]!=NULL) Mev[step].Class=0; // Cap
else if (MH[pad][2]!=NULL) Mev[step].Class=2; // LM
else Mev[step].Class=3; // Satelite
else Mev[step].Class=3; // Satellite
if (step>11 && MH[pad][0]!=NULL) Mev[step].Class=0; // Cap L->E
break;
case 'Q': case 'R': case 'S': case 'T':
Expand All @@ -173,7 +173,7 @@ void MissionSteps(char plr,int mcode,int Mgoto,int step,int pad)
if (MH[pad][3]!=NULL) Mev[step].Class=3; // DM
else Mev[step].Class=2; // Satellite
break;
case 'd': //Special
case 'd': //Special
default: break;
};

Expand Down Expand Up @@ -303,7 +303,7 @@ void MissionSteps(char plr,int mcode,int Mgoto,int step,int pad)

/////////////////////////////////////////////////
// Fix for BARIS CD-ROM Planetary Steps (Step W)
// E=moon ; M= mars ;S = saturn; V=venus; J= jupiter R= Mercury
// E= Moon; M= Mars; S= Saturn; V= Venus; J= Jupiter R= Mercury
// Must be at .Name[2]
//

Expand All @@ -314,13 +314,13 @@ void MissionSteps(char plr,int mcode,int Mgoto,int step,int pad)
Mev[step].Name[2]='V'; // Venus
Mev[step].Name[2]='E'; // Earth
Mev[step].Name[2]='M'; // Mars
Mev[step].Name[2]='J'; // Juptier
Mev[step].Name[2]='J'; // Jupiter
Mev[step].Name[2]='S'; // Saturn
#endif


if (Mev[step].Class==5) {
if (MH[0][1] && MH[0][1]->ID[1]==0x32) strncat(Mev[step].Name,"M2",2); //Kicker C
if (MH[0][1] && MH[0][1]->ID[1]==0x32) strncat(Mev[step].Name,"M2",2); //Kicker-C
else if (MH[pad][0] && MH[pad][0]->ID[1]==0x34) strncat(Mev[step].Name,"C4",2); // FourMan
else { // standard LMs
if (mcode=='P') {
Expand Down Expand Up @@ -393,7 +393,7 @@ void MissionSteps(char plr,int mcode,int Mgoto,int step,int pad)
if (strncmp(&Mev[step].Name[2],"M3C0",4)==0)
Mev[step].FName[1]='1';

if (Mev[step].FName[3]!='P') { // exclude any probe's
if (Mev[step].FName[3]!='P') { // exclude any probes
if (Mev[step].loc==15 && Mev[step].Name[6]==0x36) Mev[step].FName[1]='1';

if (Mev[step].loc==16 && STEP>8) {
Expand Down Expand Up @@ -455,7 +455,7 @@ char i,j,t;
DMFake=1;
}
}
if (Data->P[plr].Mission[mis].MissionCode==57) { // Soyuz Kicker C
if (Data->P[plr].Mission[mis].MissionCode==57) { // Soyuz Kicker-C
Data->P[plr].Mission[mis].Hard[Mission_Probe_DM]=4;
DMFake=1;
}
Expand All @@ -466,7 +466,7 @@ char i,j,t;
}


// this code is to buffer any difficulties when a mission gets through
// This code is to buffer any difficulties when a mission gets through
// all the checks to this point without having a docking module assigned
#if 0
if ((Mis.mVab[j] & 0x10)>0 && Data->P[plr].DMod==0) { // DMO Patch
Expand Down Expand Up @@ -612,7 +612,7 @@ MisDur(char plr, char dur)
diff = dur - Data->P[plr].DurLevel;
if (Data->P[plr].DurLevel == 0)
diff--;
if (diff <= 0)
if (diff <= 2) // Changed from "diff <= 0" to disable broken Duration milestone system -Leon
return;
diff = 5 * diff;
if ((MH[0][0] && MH[0][0]->ID[0] == 'C')
Expand Down
Loading

0 comments on commit db5c2d1

Please sign in to comment.