00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "Buzz_inc.h"
00019 #include "externs.h"
00020
00021 extern struct mStr Mis;
00022
00023
00024 int HardCrewAssign(char plr,char Pad,int MisType,char NewType)
00025 {
00026 int M=0;
00027 GXHEADER local3;
00028 if (NewType<=2) Data->P[plr].Future[MisType].Joint=0;
00029 else Data->P[plr].Future[MisType].Joint=1;
00030
00031 switch(NewType)
00032 {
00033 case 0: return 1;
00034 case 1: M= HardRequest(plr,0,MisType,Pad);
00035 if (M==0) return 0; else return 1;
00036 case 2: M= SecondHard(plr,0,MisType,Pad);
00037 if (M!=0) M=AsnCrew(plr,Pad,0);
00038 else return 0;
00039 return (M!=0);
00040 case 3: M=SecondHard(plr,1,MisType,Pad);
00041 Data->P[plr].Future[Pad].part=0;
00042 Data->P[plr].Future[Pad].Joint=1;
00043 Data->P[plr].Future[Pad].MissionCode=MisType;
00044 if (M!=0) M=AsnCrew(plr,Pad+1,1);
00045 else return 0;
00046 Data->P[plr].Future[Pad+1].Joint=1;
00047 Data->P[plr].Future[Pad+1].part=1;
00048 Data->P[plr].Future[Pad+1].MissionCode=MisType;
00049 if (M==0) return 0; else return 1;
00050 case 4: M= SecondHard(plr,0,MisType,Pad);
00051 GV(&local3,171,188);
00052
00053 gxGetImage(&local3,74,3,244,190,0);
00054
00055 if (M!=0) M=AsnCrew(plr,Pad,0);
00056 else {DV(&local3);return 0;};
00057 Data->P[plr].Future[Pad].part=0;
00058 Data->P[plr].Future[Pad].Joint=1;
00059 Data->P[plr].Future[Pad].MissionCode=MisType;
00060
00061 gxPutImage(&local3,gxSET,74,3,0);
00062
00063 DV(&local3);
00064 if (M!=0) M=SecondHard(plr,1,MisType,Pad);
00065 else return 0;
00066 if (M!=0) M=AsnCrew(plr,Pad+1,1);
00067 else return 0;
00068 Data->P[plr].Future[Pad+1].Joint=1;
00069 Data->P[plr].Future[Pad+1].part=1;
00070 Data->P[plr].Future[Pad+1].MissionCode=MisType;
00071 if (M==0) return 0; else return 1;
00072 case 5: M= SecondHard(plr,0,MisType,Pad+1);
00073 Data->P[plr].Future[Pad].part=0;
00074 Data->P[plr].Future[Pad].MissionCode=MisType;
00075 Data->P[plr].Future[Pad].Joint=1;
00076 Data->P[plr].Future[Pad+1].Joint=1;
00077 Data->P[plr].Future[Pad+1].part=1;
00078 Data->P[plr].Future[Pad+1].MissionCode=MisType;
00079 Data->P[plr].Future[Pad+1].Men=0;
00080 if (M==0) return 0; else return 1;
00081 default: break;
00082 };
00083 return M;
00084 }
00085
00086 void ClrFut(char plr,char pad)
00087 {
00088 char prime,back,men,i,prg;
00089 prg=Data->P[plr].Future[pad].Prog;
00090 if (Data->P[plr].Future[pad].PCrew!=0)
00091 prime=Data->P[plr].Future[pad].PCrew-1; else prime=-1;
00092 if (Data->P[plr].Future[pad].BCrew!=0)
00093 back=Data->P[plr].Future[pad].BCrew-1; else back=-1;
00094 men= Data->P[plr].Future[pad].Men;
00095 if (prime!=-1)
00096 for (i=0;i<men;i++)
00097 Data->P[plr].Pool[Data->P[plr].Crew[prg][prime][i]-1].Prime=0;
00098 if (back!=-1)
00099 for (i=0;i<men;i++)
00100 Data->P[plr].Pool[Data->P[plr].Crew[prg][back][i]-1].Prime=0;
00101 if (Data->P[plr].Future[pad].Joint==1 && Data->P[plr].Future[pad+1].part==1)
00102 {
00103 prg=Data->P[plr].Future[pad+1].Prog;
00104 if (Data->P[plr].Future[pad+1].PCrew!=0)
00105 prime=Data->P[plr].Future[pad+1].PCrew-1; else prime=-1;
00106 if (Data->P[plr].Future[pad+1].BCrew!=0)
00107 back=Data->P[plr].Future[pad+1].BCrew-1; else back=-1;
00108 men=Data->P[plr].Future[pad+1].Men;
00109 if (prime!=-1)
00110 for (i=0;i<men;i++)
00111 Data->P[plr].Pool[Data->P[plr].Crew[prg][prime][i]-1].Prime=0;
00112 if (back!=-1)
00113 for (i=0;i<men;i++)
00114 Data->P[plr].Pool[Data->P[plr].Crew[prg][back][i]-1].Prime=0;
00115 Data->P[plr].Future[pad+1].part=0;
00116 Data->P[plr].Future[pad+1].Prog=0;
00117 Data->P[plr].Future[pad+1].PCrew=0;
00118 Data->P[plr].Future[pad+1].BCrew=0;
00119 Data->P[plr].Future[pad+1].Duration=0;
00120 Data->P[plr].Future[pad+1].Joint=0;
00121 Data->P[plr].Future[pad+1].Men=0;
00122 Data->P[plr].Future[pad+1].MissionCode=0;
00123 }
00124 Data->P[plr].Future[pad].Prog=0;
00125 Data->P[plr].Future[pad].PCrew=0;
00126 Data->P[plr].Future[pad].BCrew=0;
00127 Data->P[plr].Future[pad].Men=0;
00128 Data->P[plr].Future[pad].Duration=0;
00129 Data->P[plr].Future[pad].Joint=0;
00130 Data->P[plr].Future[pad].MissionCode=0;
00131 return;
00132 }
00133
00134 int AsnCrew(char plr,char pad,char part)
00135 {
00136 int count=0,i,prg=0,grp=-1,prime=-1,men=0,back=-1,t=0,s=0,k=0,yes=0,stflag=0,bug;
00137 char temp;
00138
00139 strcpy(IKEY,"k200");
00140 men=Data->P[plr].Future[pad].Men;
00141 prg=Data->P[plr].Future[pad].Prog;
00142 if (Data->P[plr].Future[pad].PCrew==0) prime=-1;
00143 else prime=Data->P[plr].Future[pad].PCrew-1;
00144 if (Data->P[plr].Future[pad].BCrew==0) back=-1;
00145 else back=Data->P[plr].Future[pad].BCrew-1;
00146 if (prime!=-1)
00147 for (i=0;i<men;i++)
00148 Data->P[plr].Pool[Data->P[plr].Crew[prg][prime][i]-1].Prime=0;
00149 if (back!=-1)
00150 for (i=0;i<men;i++)
00151 Data->P[plr].Pool[Data->P[plr].Crew[prg][back][i]-1].Prime=0;
00152 Data->P[plr].Future[pad].PCrew=0;
00153 Data->P[plr].Future[pad].BCrew=0;
00154 prime=-1;back=-1;
00155 bug=0;count=0;
00156 for (i=0;i<ASTRONAUT_CREW_MAX;i++)
00157 {
00158 stflag=0;
00159 if (Data->P[plr].Crew[prg][i][0]==0 || Data->P[plr].Pool[Data->P[plr].Crew[prg][i][0]-1].Moved==0
00160 || Data->P[plr].Pool[Data->P[plr].Crew[prg][i][0]-1].Prime>0) stflag=0;
00161 else stflag=1;
00162 if (stflag==0) count++;
00163 }
00164 if (count>=7)
00165 {
00166
00167 if (temp)EMPTY_BODY;
00168 temp=Help("i107");
00169 bug=1;
00170 return 0;
00171 }
00172 else bug=0;
00173 ShBox(74,3,244,190);IOBox(80,102,157,116);IOBox(161,102,238,116);
00174 IOBox(80,7,154,21); IOBox(164,7,238,21);
00175 InBox(80,36,238,99);
00176 RectFill(81,37,237,98,7+3*plr);
00177 ShBox(80,24,238,33);
00178 for (i=0;i<4;i++) {
00179 IOBox(78,121+16*i,156,139+16*i);
00180 FutFltsTxt(i,1);
00181 };
00182 for (i=0;i<4;i++) {
00183 IOBox(162,121+16*i,240,139+16*i);
00184 FutFltsTxt(i+4,1);
00185 };
00186 FutSt(plr,prg,prime,back);
00187 grSetColor(1);
00188 PrintAt(97,15,"CANCEL");
00189 grSetColor(9);PrintAt(181,15,"A");grSetColor(1);PrintAt(0,0,"SSIGN");
00190 PrintAt(86,111,"MAKE ");grSetColor(9);PrintAt(0,0,"P");grSetColor(1);PrintAt(0,0,"RIMARY");
00191 PrintAt(168,111,"MAKE ");grSetColor(9);PrintAt(0,0,"B");grSetColor(1);PrintAt(0,0,"ACKUP");
00192 grSetColor(11);
00193 if (part==0) PrintAt(105,31,"SELECT PRIMARY CREW");
00194 else PrintAt(100,31,"SELECT SECONDARY CREW");
00195 grSetColor(1);
00196 count=0;
00197
00198 WaitForMouseUp();
00199 while(1)
00200 {
00201 key=0;GetMouse();
00202 for (i=0;i<ASTRONAUT_CREW_MAX;i++)
00203 {
00204 stflag=0;
00205 if (Data->P[plr].Crew[prg][i][0]==0 || Data->P[plr].Pool[Data->P[plr].Crew[prg][i][0]-1].Moved==0
00206 || Data->P[plr].Pool[Data->P[plr].Crew[prg][i][0]-1].Prime>0) stflag=0;
00207 else stflag=1;
00208 if (stflag==0) ++count;
00209 t = (i<4) ? 0 : 1;
00210 yes=0;
00211 if (t==1) k=i-4; else k=i;
00212 if (!t && x>=80 && y>=123+k*16 && x<=154 && y<=137+k*16 && grp!=i && mousebuttons!=0 && stflag==1)
00213 yes=1;
00214 else if (t && x>=164 && y>=123+k*16 && x<=238 && y<=137+k*16 && (grp!=i) && mousebuttons!=0 && stflag==1)
00215 yes=1;
00216 else if (grp!=i && stflag==1 && key=='1'+i) yes=1;
00217 if (yes==1 && bug==0)
00218 {
00219
00220 if (grp!=-1)
00221 {
00222 if (grp<4) OutBox(80,123+grp*16,154,137+grp*16);
00223 else
00224 {
00225 s=grp-4; OutBox(164,123+s*16,238,137+s*16);
00226 };
00227 }
00228 if (i<4) InBox(80,123+i*16,154,137+i*16);
00229 else InBox(164,123+k*16,238,137+k*16);
00230 grp=i;
00231 FutAstList(plr,men,Data->P[plr].Crew[prg][grp][0],
00232 Data->P[plr].Crew[prg][grp][1],
00233 Data->P[plr].Crew[prg][grp][2],
00234 Data->P[plr].Crew[prg][grp][3]);
00235
00236 WaitForMouseUp();
00237 }
00238 }
00239 if (((x>=166 && y>=9 && x<=236 && y<=19 && mousebuttons>0) || key==K_ENTER || key=='A') && prime!=-1 && back!=-1 && bug==0)
00240 {
00241
00242 InBox(166,9,236,19);
00243 for (i=0;i<men;i++)
00244 Data->P[plr].Pool[Data->P[plr].Crew[prg][prime][i]-1].Prime=4;
00245 Data->P[plr].Future[pad].PCrew=prime+1;
00246 Data->P[plr].Future[pad].BCrew=back+1;
00247 for (i=0;i<men;i++)
00248 Data->P[plr].Pool[Data->P[plr].Crew[prg][back][i]-1].Prime=2;
00249
00250 WaitForMouseUp();
00251 if (key>0) delay(150);
00252 return 1;
00253 }
00254 else
00255 if ((x>=82 && y>=9 && x<=152 && y<=19 && mousebuttons!=0) || key==K_ESCAPE)
00256 {
00257 InBox(82,9,152,19);
00258 WaitForMouseUp();
00259 if (key>0) delay(150);
00260 ClrFut(plr,pad);
00261 return 0;
00262 }
00263 else
00264 if (((x>=82 && y>=104 && x<=155 && y<=114 && mousebuttons>0) || key=='P') && prime!=grp && back!=grp && grp!=-1 && bug==0)
00265 {
00266 InBox(82,104,155,114); prime=grp;
00267 FutSt(plr,prg,prime,back);
00268 WaitForMouseUp();
00269 if (key>0) delay(110);
00270 OutBox(82,104,155,114);
00271 }
00272 else
00273 if (((x>=163 && y>=104 && x<=236 && y<=114 && mousebuttons>0) || key=='B') && prime!=grp && back!=grp && grp!=-1 && bug==0)
00274 {
00275 InBox(163,104,236,114); back=grp;
00276 FutSt(plr,prg,prime,back);
00277 WaitForMouseUp();
00278 OutBox(163,104,236,114);
00279 if (key>0) delay(110);
00280 };
00281 };
00282 }
00283
00284 void FutFltsTxt(char nw,char col)
00285 {
00286 int temp=0;
00287
00288 grSetColor(col);
00289 if (nw < 4) PrintAt(83,129+nw*16,"FLT. CREW ");
00290 else { temp=nw-4; PrintAt(167,129+temp*16,"FLT. CREW ");};
00291 switch(nw) {
00292 case 0: PrintAt(0,0,"I");break;
00293 case 1: PrintAt(0,0,"II");break;
00294 case 2: PrintAt(0,0,"III");break;
00295 case 3: PrintAt(0,0,"IV");break;
00296 case 4: PrintAt(0,0,"V");break;
00297 case 5: PrintAt(0,0,"VI");break;
00298 case 6: PrintAt(0,0,"VII");break;
00299 case 7: PrintAt(0,0,"VIII");break;
00300 default: break;
00301 };
00302
00303 return;
00304 }
00305
00306 void FutSt(char plr,int pr,int p,int b)
00307 {
00308 int i;
00309 for (i=0;i<ASTRONAUT_CREW_MAX;i++) {
00310 if (i==p) FutSt2(i,3);
00311 if (i==b) FutSt2(i,4);
00312 if (i!=p && i!=b) {
00313 if (Data->P[plr].Crew[pr][i][0]==0) FutSt2(i,2);
00314 else if (Data->P[plr].Pool[Data->P[plr].Crew[pr][i][0]-1].Moved==0)
00315 FutSt2(i,1);
00316 else if (Data->P[plr].Pool[Data->P[plr].Crew[pr][i][0]-1].Prime>0)
00317 FutSt2(i,5);
00318 else FutSt2(i,0);
00319 }
00320 };
00321 return;
00322 }
00323
00324 void FutSt2(int num,int type)
00325 {
00326 int temp=0;
00327 if (num < 4) { RectFill(84,130+num*16,151,136+num*16,3);
00328 grMoveTo(84,135+num*16); }
00329 else { temp=num-4; RectFill(168,130+temp*16,235,136+temp*16,3);
00330 grMoveTo(168,135+temp*16); };
00331 switch(type) {
00332 case 0: grSetColor(6);PrintAt(0,0,"UNASSIGNED");break;
00333 case 1: grSetColor(9);PrintAt(0,0,"TRAINING");break;
00334 case 2: grSetColor(9);PrintAt(0,0,"VACANT");break;
00335 case 3: grSetColor(11);PrintAt(0,0,"PRIMARY");break;
00336 case 4: grSetColor(11);PrintAt(0,0,"BACKUP");break;
00337 case 5: grSetColor(10);PrintAt(0,0,"ASSIGNED");break;
00338 default: break;
00339 };
00340 return;
00341 }
00342
00343 void FutAstList(char plr,char men,int M1,int M2,int M3,int M4)
00344 {
00345 int i=0,m[4];
00346
00347 m[0]=M1;m[1]=M2;m[2]=M3;m[3]=M4;
00348 RectFill(82,38,236,97,7+plr*3);
00349 grSetColor(1);
00350 for (i=0;i<men;i++)
00351 if (m[i]>0) {
00352 PrintAt(87,45+i*14,&Data->P[plr].Pool[m[i]-1].Name[0]);
00353 PrintAt(87,51+i*14,"CP:");
00354 DispNum(0,0,Data->P[plr].Pool[m[i]-1].Cap);
00355 PrintAt(0,0," LM:");
00356 DispNum(0,0,Data->P[plr].Pool[m[i]-1].LM);
00357 PrintAt(0,0," EV:");
00358 DispNum(0,0,Data->P[plr].Pool[m[i]-1].EVA);
00359 PrintAt(0,0," DO:");
00360 DispNum(0,0,Data->P[plr].Pool[m[i]-1].Docking);
00361 PrintAt(0,0," EN:");
00362 DispNum(0,0,Data->P[plr].Pool[m[i]-1].Endurance);
00363 };
00364 return;
00365 }
00366
00367
00368 void DrawHard(char mode,char pad,char mis,char plr)
00369 {
00370 strcpy(IKEY,"k201");
00371 ShBox(75,43,244,173);InBox(81,60,238,95);IOBox(81,154,238,167);
00372 InBox(81,47,238,56);RectFill(82,61,237,94,6+3*plr);
00373 grSetColor(11);
00374 if (mode==0) PrintAt(90,54,"SELECT PRIMARY VEHICLE");
00375 else PrintAt(90,54,"SELECT SECONDARY VEHICLE");
00376 grSetColor(1);
00377 GetMisType(mis);
00378 PrintAt(85,70,Mis.Abbr);
00379
00380
00381 PrintAt(85,85,"PAD: ");DispNum(0,0,pad+1);
00382 PrintAt(94,109,Data->P[plr].Manned[0].Name);
00383 PrintAt(174,109,Data->P[plr].Manned[1].Name);
00384 PrintAt(94,126,Data->P[plr].Manned[2].Name);
00385 PrintAt(174,126,Data->P[plr].Manned[3].Name);
00386 PrintAt(137,143,Data->P[plr].Manned[4].Name);
00387 PrintAt(144,163,"CANCEL");
00388 return;
00389 }
00390
00391 int HardRequest(char plr,char mode,char mis,char pad)
00392 {
00393 int i=0,pr[5],t=0;
00394 for (i=0;i<5;i++)
00395 if (Data->P[plr].Manned[i].Num>=0) {pr[i]=1;t++;}
00396 else pr[i]=0;
00397
00398 GetMisType(mis);
00399
00400 if (Mis.Lun==1 || Mis.Doc==1 || Mis.mEq>1 || Mis.Days>1 ||
00401 Data->P[plr].Future[pad].Duration>2) pr[0]=0;
00402
00403 if (Data->P[plr].Future[pad].Duration>5 || Mis.Days>5) pr[1]=0;
00404
00405 if (Data->P[plr].Future[pad].Duration>3) pr[3]=0;
00406 if (mis==54) {
00407 pr[0]=pr[1]=pr[2]=pr[3]=0;
00408 }
00409 if (mis==57 && plr==1) {
00410 pr[0]=pr[1]=pr[3]=pr[4]=0;
00411 }
00412 if (Mis.Doc==1) pr[4]=0;
00413
00414
00415
00416 DrawHard(mode,pad,mis,plr);
00417 if (pr[0]==0) InBox(81,100,158,114); else IOBox(81,100,158,114);
00418 if (pr[1]==0) InBox(161,100,238,114); else IOBox(161,100,238,114);
00419 if (pr[2]==0) InBox(81,117,158,131); else IOBox(81,117,158,131);
00420 if (pr[3]==0) InBox(161,117,238,131); else IOBox(161,117,238,131);
00421 if (pr[4]==0) InBox(121,134,198,148); else IOBox(121,134,198,148);
00422
00423 i=0;
00424 WaitForMouseUp();
00425 while(i==0) {
00426 key=0;GetMouse();
00427 if (mousebuttons!=0 || key>0) {
00428 if (((x>=83 && y>=102 && x<=156 && y<=112) || key=='1') && pr[0]) {
00429 InBox(83,102,156,112);i=1;
00430 WaitForMouseUp();
00431 }
00432 else
00433 if (((x>=163 && y>=102 && x<=236 && y<=112) || key=='2') && pr[1]) {
00434 InBox(163,102,236,112);i=2;
00435 WaitForMouseUp();
00436 }
00437 else
00438 if (((x>=83 && y>=119 && x<=156 && y<=129) || key=='3') && pr[2]) {
00439 InBox(83,119,156,129);i=3;
00440 WaitForMouseUp();
00441 }
00442 else
00443 if (((x>=163 && y>=119 && x<=236 && y<=129) || key=='4') && pr[3]) {
00444 InBox(163,119,236,129);i=4;
00445 WaitForMouseUp();
00446 }
00447 else
00448 if (((x>=123 && y>=136 && x<=196 && y<=146) || key=='5') && pr[4]) {
00449 InBox(123,136,196,146);i=5;
00450 WaitForMouseUp();
00451 }
00452 else
00453 if ((x>=83 && y>=156 && x<=236 && y<=165 && mousebuttons!=0) || key==K_ENTER || key==K_ESCAPE) {
00454 InBox(83,156,236,165);
00455 WaitForMouseUp();
00456 if (key>0) delay(150);
00457 return 0;
00458 };
00459 };
00460 };
00461 Data->P[plr].Future[pad].Prog=i;
00462 return i;
00463 }
00464
00465 int SecondHard(char plr,char mode,char mis,char pad)
00466 {
00467
00468 int i=0,men=0,prg=0,prog[5],t=0;
00469 for (i=0;i<5;i++) if (Data->P[plr].Manned[i].Num>=0) men++;
00470 if (men==0) {Help("i126"); return 0;};
00471
00472 if (mode==1) pad++;
00473 for (i=0;i<5;i++)
00474 if (Data->P[plr].Manned[i].Num>=0) {prog[i]=1;t++;}
00475 else prog[i]=0;
00476 GetMisType(mis);
00477
00478 if (Mis.Lun==1 || Mis.Doc==1 || Mis.mEq>1 || Mis.Days>2 ||
00479 Data->P[plr].Future[pad].Duration>2) prog[0]=0;
00480
00481 if (Data->P[plr].Future[pad].Duration>5 || Mis.Days>5) prog[1]=0;
00482
00483 if (Data->P[plr].Future[pad].Duration>4) prog[3]=0;
00484 if (mis==54) {
00485 prog[0]=prog[1]=prog[2]=prog[3]=0;
00486 }
00487 if (Mis.Doc==1) prog[4]=0;
00488 if (mis==57 && plr==1) {
00489 prog[0]=prog[1]=prog[3]=prog[4]=0;
00490 }
00491
00492 DrawHard(mode,pad,mis,plr);
00493 if (prog[0]==0) InBox(81,100,158,114); else IOBox(81,100,158,114);
00494 if (prog[1]==0) InBox(161,100,238,114); else IOBox(161,100,238,114);
00495 if (prog[2]==0) InBox(81,117,158,131); else IOBox(81,117,158,131);
00496 if (prog[3]==0) InBox(161,117,238,131); else IOBox(161,117,238,131);
00497 if (prog[4]==0) InBox(121,134,198,148); else IOBox(121,134,198,148);
00498
00499 i=0;
00500 WaitForMouseUp();
00501 while(i==0)
00502 {
00503 key=0;GetMouse();
00504 if (mousebuttons>0 || key>0) {
00505 if (((x>=83 && y>=102 && x<=156 && y<=112 && mousebuttons!=0) || key=='1') && prog[0]!=0 && prg!=1)
00506 {
00507 men=1; InBox(83,102,156,112); i=1;
00508 WaitForMouseUp();
00509 }
00510 else
00511 if (((x>=163 && y>=102 && x<=236 && y<=112 && mousebuttons!=0) || key=='2') && prog[1]!=0 && prg!=3)
00512 {
00513 men=2; InBox(163,102,236,112); i=2;
00514 WaitForMouseUp();
00515 }
00516 else
00517 if (((x>=83 && y>=119 && x<=156 && y<=129 && mousebuttons!=0) || key=='3') && prog[2]!=0 && prg!=2)
00518 {
00519 men=3; InBox(83,119,156,129); i=3;
00520 WaitForMouseUp();
00521 }
00522 else
00523 if (((x>=163 && y>=119 && x<=236 && y<=129 && mousebuttons!=0) || key=='4') && prog[3]!=0 && prg!=4)
00524 {
00525 men=3; InBox(163,119,236,129); i=4;
00526 WaitForMouseUp();
00527 }
00528 else
00529 if (((x>=123 && y>=136 && x<=196 && y<=146 && mousebuttons!=0) || key=='5') && prog[4]!=0 && prg!=5)
00530 {
00531 men=4; InBox(123,136,196,146); i=5;
00532 WaitForMouseUp();
00533 }
00534 else
00535 if ((x>=83 && y>=156 && x<=236 && y<=165 && mousebuttons!=0) || key==K_ENTER)
00536 {
00537 InBox(83,156,236,165);
00538 WaitForMouseUp();
00539 if (key>0) delay(150);
00540 return 0;
00541 };
00542 }
00543 }
00544 Data->P[plr].Future[pad].Prog=i;
00545 Data->P[plr].Future[pad].Men=men;
00546 return i;
00547 }
00548
00549
00550