Skip to content

Commit

Permalink
More/improved visual cues in R&D/Purchasing and VAB/VIB screens
Browse files Browse the repository at this point in the history
  • Loading branch information
peyre committed Aug 19, 2012
1 parent dd1699b commit 33cf9bc
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 61 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2012-08-19 Leon Baradat <[email protected]>

* V281

* endgame.c: Centered "CONTINUE" in end-game screen

* hardef.c, rdplex.c, vab.c: More/improved visual cues in R&D/Purchasing and VAB/VIB screens

2012-04-25 Leon Baradat <[email protected]>

* V280
Expand Down
6 changes: 3 additions & 3 deletions endgame.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void EndGame(char win,char pad)
if (win==0) DispBig(34,5,"US WINS",1,-1);
else DispBig(34,5,"USSR WINS",1,-1);
FlagSm(win,4,4);
grSetColor(1);PrintAt(258,13,"CONTINUE");
grSetColor(1);PrintAt(256,13,"CONTINUE");

if (Option==-1 && MAIL==-1) miss=Data->P[win].Mission[pad].MissionCode;
else {
Expand Down Expand Up @@ -312,7 +312,7 @@ void EndGame(char win,char pad)
default:break;
}
}
//Print the first in the moon
//Print the first on the Moon
firstOnMoon = (manOnMoon==1? man1 : manOnMoon==2? man2 : manOnMoon==3? man3 :manOnMoon==4? man4: man2);
grSetColor(11);PrintAt(10,60,"FIRST ON THE MOON: ");grSetColor(14);PrintAt(0,0,&Data->P[win].Pool[firstOnMoon].Name[0]);

Expand Down Expand Up @@ -764,7 +764,7 @@ EndPict(int x, int y, char poff, unsigned char coff)
/*
* off by one error in data file - again
* P.w += 1 solves the problem, but then
* we get a strip of garbage on the right hand side
* we get a strip of garbage on the right-hand side
*/
P.w++;
fseek(in, P.offset, SEEK_SET);
Expand Down
12 changes: 6 additions & 6 deletions hardef.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ShowHard(char plr)
{
key = 0;
GetMouse();
if (mousebuttons > 0 || key > 0) /* Game Play */
if (mousebuttons > 0 || key > 0) /* Gameplay */
{
if (((x >= 7 && y >= 164 && x <= 75 && y <= 195
&& mousebuttons > 0) || key == 'U') && place != 0)
Expand Down Expand Up @@ -288,7 +288,7 @@ PInfo(char plr, char loc)
Pt[1][4] += stge;
}
} // end-if
} //end-if
} // end-if
}; // end-if

//EVA suit klugge
Expand Down Expand Up @@ -1492,20 +1492,20 @@ DrawRank(char plr)
{
InBox(55, 21, 116, 29);
grSetColor(1);
PrintAt(57, 27, "SCORE:");
PrintAt(60, 27, "SCORE:");
score = 0;
score = CalcScore(0, Data->Def.Lev1, Data->Def.Lev2);
sprintf(&Digit[0], "%d", score);
PrintAt(92, 27, &Digit[0]);
PrintAt(95, 27, &Digit[0]);
}
if (Option == -1 || Option == 1)
{
InBox(203, 21, 264, 29);
grSetColor(1);
PrintAt(205, 27, "SCORE:");
PrintAt(208, 27, "SCORE:");
score = CalcScore(1, Data->Def.Lev2, Data->Def.Lev1);
sprintf(&Digit[0], "%d", score);
PrintAt(240, 27, &Digit[0]);
PrintAt(243, 27, &Digit[0]);
}

}
Expand Down
27 changes: 19 additions & 8 deletions rdplex.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ void DrawRD(char player_index)
//GradRect(27,95,130,171,player_index*16+128);
RectFill(27,95,130,171,0);

grSetColor(9);
PrintAt(13,80,"V");
grSetColor(1);
PrintAt(13,80,"VISIT PURCHASING FACILITY");
PrintAt(0,0,"ISIT PURCHASING FACILITY");

for (i=0;i<6;i++)
gxVirtualDisplay(&mans,i*20,0,166+i*26,158,184+i*26,174,0);
Expand Down Expand Up @@ -247,7 +249,11 @@ RDButTxt(int cost, int encodedRolls, char playerIndex, char SpDModule) //DM Scre

if (diceRoll == 0)
{
PrintAt(169, 191, "RESEARCH PROGRAM FOR ");
PrintAt(169, 191, "RE");
grSetColor(9);
PrintAt(0,0,"S");
grSetColor(1);
PrintAt(0,0,"EARCH PROGRAM FOR ");
grSetColor(9);
DispNum(0, 0, cost);
grSetColor(1);
Expand Down Expand Up @@ -637,14 +643,15 @@ void ShowUnit(char hw,char un,char player_index)

if (Data->P[player_index].RDMods != 0)
{
PrintAt(170,153,"RESEARCH ");
if (Data->P[player_index].RDMods > 0)
{ PrintAt(0,0,"STRONG: ");
RectFill(264,149,264,153,1); RectFill(262,151,266,151,1); // This is to fake a plus sign, which the game apparently can't draw -Leon
{ grSetColor(5);
PrintAt(170,153,"RESEARCH STRONG: ");
RectFill(264,149,264,153,5); RectFill(262,151,266,151,5); // This fakes a plus sign, which the game apparently can't draw -Leon
}
else
{
PrintAt(0,0,"WEAK: ");
grSetColor(8);
PrintAt(170,153,"RESEARCH WEAK: ");
}
DispNum(0,0,Data->P[player_index].RDMods);
PrintAt(0,0,"%/TEAM");
Expand Down Expand Up @@ -790,16 +797,20 @@ void DrawHPurc(char player_index)
RectFill(27,95,130,171,0);

LTArrow(24,186);RTArrow(101,186);
grSetColor(9);
PrintAt(34,80,"V");
grSetColor(1);
PrintAt(34,80,"VISIT R&D FACILITY");
PrintAt(0,0,"ISIT R&D FACILITY");

gxVirtualDisplay(&but,0,0,8,30,74,59,0); // Unmanned
gxVirtualDisplay(&but,68,0,84,30,155,59,0); // Rocket
gxVirtualDisplay(&but,141,0,165,30,236,59,0);// Manned
gxVirtualDisplay(&but,214,0,246,30,312,59,0);// Misc

grSetColor(9);
PrintAt(191,190,"P");
grSetColor(11);
PrintAt(191,190,"PURCHASE EQUIPMENT");
PrintAt(0,0,"URCHASE EQUIPMENT");

if (Data->Season==0) PrintAt(158,8,"SPRING");
else PrintAt(162,8,"FALL");
Expand Down
100 changes: 57 additions & 43 deletions vab.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ extern char AI[2];
struct VInfo VAS[7][4];
char VASqty,CV;
extern struct mStr Mis;
extern char Vab_Spot;
int TotalCost; char hasDelay;//Used to display the cost of autopurchase
extern char Vab_Spot;
int TotalCost; char hasDelay; //Used to display the cost of autopurchase

// CAP,LM,SDM,DMO,EVA,PRO,INT,KIC
char isDamaged[8] = {0,0,0,0,0,0,0,0};
Expand Down Expand Up @@ -162,15 +162,22 @@ void DispVAB(char plr,char pad)

IOBox(4,84,165,96);

grSetColor(9);
PrintAt(200,192,"E");
grSetColor(1);
PrintAt(200,192,"EXIT");
PrintAt(268,192,"SCRUB");
PrintAt(0,0,"XIT");
grSetColor(9);
PrintAt(268,192,"S");
grSetColor(1);
PrintAt(0,0,"CRUB");
PrintAt(263,13,"ASSIGN");
PrintAt(18,136,"PRIMARY:");
grSetColor(9); PrintAt(18,136,"P");
grSetColor(1); PrintAt(0,0,"RIMARY:");
PrintAt(24,148,"KICKER:");
PrintAt(42,160,"L.M.:");
PrintAt(16,172,"PAYLOAD:");
PrintAt(22,188,"ROCKET: ");
grSetColor(9); PrintAt(22,188,"R");
grSetColor(1); PrintAt(0,0,"ROCKET: ");

Name[0]='A'+pad; Name[1]=0x00;
InBox(4,27,166,37);RectFill(5,28,165,36,10);
Expand Down Expand Up @@ -620,7 +627,7 @@ void VAB(char plr)
char Name[8][12],ButOn,temp;
FILE* file;
int MI_size = sizeof (struct MDA) * 28 * 2;



file = sOpen("VTABLE.DAT", "rb", 0);
fread(MI, MI_size, 1, file);
Expand Down Expand Up @@ -680,7 +687,7 @@ void VAB(char plr)
// Rocket Display Data --------------------------
for (i=0;i<7;i++) {
if (i>3) {
isDamaged[i] = Data->P[plr].Rocket[i-4].Damage!=0?1:0;
isDamaged[i] = Data->P[plr].Rocket[i-4].Damage!=0?1:0;
sf[i] = RocketBoosterSafety(Data->P[plr].Rocket[i-4].Safety, Data->P[plr].Rocket[4].Safety);
strcpy(&Name[i][0],"B/");
strcat(&Name[i][0],&Data->P[plr].Rocket[i-4].Name[0]);
Expand Down Expand Up @@ -709,29 +716,31 @@ void VAB(char plr)
DispRck(plr,rk);
DispVA(plr,ccc);
cwt=0;for (i=0;i<4;i++) cwt+=VAS[ccc][i].wt;
DispWts(cwt,pay[rk]);

//display cost (XX of XX)
hasDelay=0;
DispWts(cwt,pay[rk]);

//display cost (XX of XX)
hasDelay=0;
TotalCost=0;
hasDelay=ChkDelVab(plr,ccc);
if (hasDelay!=0) hasDelay=ChkVabRkt(plr,rk,&qty[0]);
TotalCost=FillVab(plr,ccc,0);
TotalCost+=BuyVabRkt(plr,rk,&qty[0],0);
TotalCost+=BuyVabRkt(plr,rk,&qty[0],0);
RectFill(7,87,162,93,3);
grSetColor(1); if (hasDelay==0 || TotalCost>Data->P[plr].Cash) grSetColor(9); //if cant buy (delay, cost>cash) ->red letters
PrintAt(13,92,"AUTOPURCHASE (");
DispNum(0,0,TotalCost);
grSetColor(9);
PrintAt(13,92,"A");
grSetColor(1); if (hasDelay==0 || TotalCost>Data->P[plr].Cash) grSetColor(9); //if can't buy (delay, cost>cash) ->red letters
PrintAt(0,0,"UTOPURCHASE (");
DispNum(0,0,TotalCost);
PrintAt(0,0," OF ");
DispMB(0,0,Data->P[plr].Cash);
DispMB(0,0,Data->P[plr].Cash);
PrintAt(0,0,")");

FadeIn(2,pal,10,0,0);
WaitForMouseUp();
while (1)
{
key=0;GetMouse();
if (mousebuttons > 0 || key>0) /* Game Play */
if (mousebuttons > 0 || key>0) /* Gameplay */
{

// AUTOPURCHASE
Expand All @@ -754,7 +763,7 @@ void VAB(char plr)
// Rocket Display Data --------------------------
for (i=0;i<7;i++) {
if (i>3) {
isDamaged[i] = Data->P[plr].Rocket[i-4].Damage!=0?1:0;
isDamaged[i] = Data->P[plr].Rocket[i-4].Damage!=0?1:0;
sf[i] = RocketBoosterSafety(Data->P[plr].Rocket[i-4].Safety, Data->P[plr].Rocket[4].Safety);
strcpy(&Name[i][0],"B/");
strcat(&Name[i][0],&Data->P[plr].Rocket[i-4].Name[0]);
Expand All @@ -770,19 +779,20 @@ void VAB(char plr)
pay[i]=Data->P[plr].Rocket[i].MaxPay;
}
}
//display cost (XX of XX)
hasDelay=0;
//display cost (XX of XX)
hasDelay=0;
TotalCost=0;
hasDelay=ChkDelVab(plr,ccc);
if (hasDelay!=0) hasDelay=ChkVabRkt(plr,rk,&qty[0]);
TotalCost=FillVab(plr,ccc,0);
TotalCost+=BuyVabRkt(plr,rk,&qty[0],0);
TotalCost+=BuyVabRkt(plr,rk,&qty[0],0);
RectFill(7,87,162,93,3);
grSetColor(1); if (hasDelay==0 || TotalCost>Data->P[plr].Cash) grSetColor(9); //if cant buy (delay, cost>cash) ->red letters
PrintAt(13,92,"AUTOPURCHASE (");
DispNum(0,0,TotalCost);
grSetColor(9); PrintAt(13,92,"A");
grSetColor(1); if (hasDelay==0 || TotalCost>Data->P[plr].Cash) grSetColor(9); //if can't buy (delay, cost>cash) ->red letters
PrintAt(0,0,"UTOPURCHASE (");
DispNum(0,0,TotalCost);
PrintAt(0,0," OF ");
DispMB(0,0,Data->P[plr].Cash);
DispMB(0,0,Data->P[plr].Cash);
PrintAt(0,0,")");
}
else if (ac==0) Help("i135"); // delay on purchase
Expand Down Expand Up @@ -884,21 +894,23 @@ void VAB(char plr)
if (rk>6) rk=0;
if (((Misdef(mis)>=42 && Misdef(mis)<=57) || (Misdef(mis)>=7 && Misdef(mis)<=13)) && (rk==4 || rk==0))
if (options.cheat_altasOnMoon==0) rk++;

//display cost (XX of XX)
hasDelay=0;

//display cost (XX of XX)
hasDelay=0;
TotalCost=0;
hasDelay=ChkDelVab(plr,ccc);
if (hasDelay!=0) hasDelay=ChkVabRkt(plr,rk,&qty[0]);
TotalCost=FillVab(plr,ccc,0);
TotalCost+=BuyVabRkt(plr,rk,&qty[0],0);
TotalCost+=BuyVabRkt(plr,rk,&qty[0],0);
RectFill(7,87,162,93,3);
grSetColor(1); if (hasDelay==0 || TotalCost>Data->P[plr].Cash) grSetColor(9); //if cant buy (delay, cost>cash) ->red letters
PrintAt(13,92,"AUTOPURCHASE (");
DispNum(0,0,TotalCost);
grSetColor(9);
PrintAt(13,92,"A");
grSetColor(1); if (hasDelay==0 || TotalCost>Data->P[plr].Cash) grSetColor(9); //if can't buy (delay, cost>cash) ->red letters
PrintAt(0,0,"UTOPURCHASE (");
DispNum(0,0,TotalCost);
PrintAt(0,0," OF ");
DispMB(0,0,Data->P[plr].Cash);
PrintAt(0,0,")");
DispMB(0,0,Data->P[plr].Cash);
PrintAt(0,0,")");

ShowRkt(&Name[rk][0],sf[rk],qty[rk],pay[rk]<wgt,isDamaged[rk]);
DispWts(cwt,pay[rk]);
Expand All @@ -915,20 +927,22 @@ void VAB(char plr)
ccc++; if (ccc>VASqty) ccc=0;
cwt=0;for (i=0;i<4;i++) cwt+=VAS[ccc][i].wt;
ShowVA(ccc);DispWts(cwt,pay[rk]);
DispVA(plr,ccc);
//display cost (XX of XX)
hasDelay=0;
DispVA(plr,ccc);
//display cost (XX of XX)
hasDelay=0;
TotalCost=0;
hasDelay=ChkDelVab(plr,ccc);
if (hasDelay!=0) hasDelay=ChkVabRkt(plr,rk,&qty[0]);
TotalCost=FillVab(plr,ccc,0);
TotalCost+=BuyVabRkt(plr,rk,&qty[0],0);
TotalCost+=BuyVabRkt(plr,rk,&qty[0],0);
RectFill(7,87,162,93,3);
grSetColor(1); if (hasDelay==0 || TotalCost>Data->P[plr].Cash) grSetColor(9); //if cant buy (delay, cost>cash) ->red letters
PrintAt(13,92,"AUTOPURCHASE (");
DispNum(0,0,TotalCost);
grSetColor(9);
PrintAt(13,92,"A");
grSetColor(1); if (hasDelay==0 || TotalCost>Data->P[plr].Cash) grSetColor(9); //if can't buy (delay, cost>cash) ->red letters
PrintAt(0,0,"UTOPURCHASE (");
DispNum(0,0,TotalCost);
PrintAt(0,0," OF ");
DispMB(0,0,Data->P[plr].Cash);
DispMB(0,0,Data->P[plr].Cash);
PrintAt(0,0,")");
WaitForMouseUp();
if (key>0) delay(100);
Expand Down
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
280
281

0 comments on commit 33cf9bc

Please sign in to comment.