MODEM.BAK 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. //
  2. // Enter modem config info
  3. //
  4. #include <process.h>
  5. #include <dos.h>
  6. #include <string.h>
  7. #include <stdio.h>
  8. #include <conio.h>
  9. #include <stdlib.h>
  10. #include <bios.h>
  11. #include "main.h"
  12. #include "default.h"
  13. //
  14. // Choose who to call for modem play
  15. //
  16. phonelist_t phonelist[MAXPHNLIST];
  17. int numInList;
  18. char chosenPhoneNum[16];
  19. //
  20. // Parse the MODOOM.NUM file
  21. //
  22. int ParseMODOOMList(void)
  23. {
  24. int i;
  25. int ok;
  26. FILE *fp;
  27. int rv;
  28. int found;
  29. fp = fopen("MODEM.NUM","rt");
  30. if (fp == NULL)
  31. {
  32. gotoxy(2,25);
  33. printf("There's no MODEM.NUM file! Press a key. ");
  34. sound(2500);
  35. delay(3);
  36. nosound();
  37. getch();
  38. return 0;
  39. }
  40. i = 0;
  41. ok = 1;
  42. do
  43. {
  44. rv = fscanf(fp,"%[^\n]",&phonelist[i].name);
  45. if (!rv || rv == EOF)
  46. ok = 0;
  47. rv = fscanf(fp,"\n");
  48. if (rv == EOF)
  49. ok = 0;
  50. rv = fscanf(fp,"%[^\n]",&phonelist[i].number);
  51. if (!rv || rv == EOF)
  52. ok = 0;
  53. rv = fscanf(fp,"\n\n");
  54. if (rv == EOF)
  55. ok = 0;
  56. i++;
  57. } while(ok);
  58. numInList = i;
  59. fclose(fp);
  60. //
  61. // Quick little shell sort
  62. //
  63. do
  64. {
  65. int j;
  66. found = 0;
  67. for (i = 0; i < numInList-1; i++)
  68. for (j = i+1; j < numInList; j++)
  69. if (strcmp(phonelist[j].name,phonelist[i].name)<0)
  70. {
  71. phonelist_t temp;
  72. temp = phonelist[j];
  73. phonelist[j] = phonelist[i];
  74. phonelist[i] = temp;
  75. found = 1;
  76. }
  77. } while(found);
  78. return 1;
  79. }
  80. //
  81. // Blit the phone numbers to the screen
  82. //
  83. void BlitPhoneNumbers(int start)
  84. {
  85. int i;
  86. int max;
  87. int y;
  88. int j;
  89. int len;
  90. max = start + 10;
  91. if (max > numInList)
  92. max = numInList;
  93. y = 8;
  94. for (i = start; i < max; i++)
  95. {
  96. gotoxy(17,y);
  97. cprintf("%s",phonelist[i].name);
  98. len = 32 - strlen(phonelist[i].name);
  99. for (j = 0; j < len; j++)
  100. cprintf(" ");
  101. gotoxy(49,y++);
  102. cprintf("%s",phonelist[i].number);
  103. len = 16 - strlen(phonelist[i].number);
  104. for (j = 0; j < len; j++)
  105. cprintf(" ");
  106. }
  107. gotoxy(1,25);
  108. }
  109. //
  110. // Choose who to call
  111. //
  112. enum {ADDNAME,ADDNUMBER,MAXADD};
  113. item_t additems[]= {
  114. {ADDNAME, 17,12,28,-1,ADDNUMBER},
  115. {ADDNUMBER, 46,12,18,ADDNAME,-1}};
  116. menu_t addmenu = {&additems[0],ADDNAME,MAXADD,0x7f};
  117. int ChooseOpponentInList(void)
  118. {
  119. int i;
  120. int xit;
  121. int blitY;
  122. int hliteY;
  123. int lastHliteY;
  124. int index;
  125. chosenPhoneNum[0] = 0;
  126. if (!ParseMODOOMList())
  127. return 0;
  128. SaveScreen();
  129. DrawPup(&phonelst);
  130. textcolor(11);
  131. textbackground(1);
  132. gotoxy(1,25);
  133. xit = 0;
  134. blitY = 0;
  135. lastHliteY = hliteY = 0;
  136. do
  137. {
  138. int key;
  139. textcolor(11);
  140. textbackground(1);
  141. BlitPhoneNumbers(blitY);
  142. AttriBar(16,lastHliteY+7,48,0x1b);
  143. lastHliteY = hliteY;
  144. AttriBar(16,hliteY+7,48,0x7f);
  145. key = _bios_keybrd(_NKEYBRD_READ)>>8;
  146. switch(key)
  147. {
  148. #ifndef FRENCH
  149. case KEY_F1: // ADD NUMBER TO LIST!
  150. SaveScreen();
  151. DrawPup(&entrnmbr);
  152. {
  153. int field;
  154. int key;
  155. int which;
  156. int exit;
  157. char tempstring[32];
  158. which = numInList;
  159. exit = 0;
  160. while(!exit)
  161. {
  162. SetupMenu(&addmenu);
  163. field = GetMenuInput();
  164. switch(menukey)
  165. {
  166. case KEY_F10: // DONE!
  167. if (phonelist[which].name[0] ||
  168. phonelist[which].number[0])
  169. {
  170. FILE *fp;
  171. numInList++;
  172. fp = fopen("MODEM.NUM","w+");
  173. if (fp == NULL)
  174. {
  175. gotoxy(2,25);
  176. printf("Error creating MODEM.NUM file! Press a key. ");
  177. sound(2500);
  178. delay(3);
  179. nosound();
  180. getch();
  181. return 0;
  182. }
  183. for (i = 0;i < numInList; i++)
  184. fprintf(fp,"%s\n%s\n\n",
  185. phonelist[i].name,phonelist[i].number);
  186. fclose(fp);
  187. }
  188. case KEY_ESC: // ABORT!
  189. exit = 1;
  190. break;
  191. case KEY_ENTER: // EDIT NUMBER/NAME
  192. switch(field)
  193. {
  194. case ADDNAME:
  195. strcpy(tempstring,phonelist[which].name);
  196. key = EditLine(&additems[ADDNAME],tempstring,28);
  197. if (key == KEY_ENTER)
  198. strcpy(phonelist[which].name,tempstring);
  199. textcolor(15);
  200. textbackground(1);
  201. Clear(&additems[ADDNAME]);
  202. Pos(&additems[ADDNAME]);
  203. cprintf("%s",phonelist[which].name);
  204. gotoxy(1,25);
  205. break;
  206. case ADDNUMBER:
  207. strcpy(tempstring,phonelist[which].number);
  208. key = EditLine(&additems[ADDNUMBER],tempstring,18);
  209. if (key == KEY_ENTER)
  210. strcpy(phonelist[which].number,tempstring);
  211. textcolor(15);
  212. textbackground(1);
  213. Clear(&additems[ADDNUMBER]);
  214. Pos(&additems[ADDNUMBER]);
  215. cprintf("%s",phonelist[which].number);
  216. gotoxy(1,25);
  217. break;
  218. }
  219. break;
  220. }
  221. }
  222. }
  223. RestoreScreen();
  224. break;
  225. #endif
  226. case 0x1c: // ENTER
  227. index = blitY + hliteY;
  228. for (i=0;i<strlen(phonelist[index].number);i++)
  229. if ((phonelist[index].number[i] >= '0' &&
  230. phonelist[index].number[i] <= '9') ||
  231. phonelist[index].number[i] == '#' ||
  232. phonelist[index].number[i] == '*' ||
  233. phonelist[index].number[i] == ',')
  234. {
  235. char num[2];
  236. num[0] = phonelist[index].number[i];
  237. num[1] = 0;
  238. strcat(chosenPhoneNum,num);
  239. }
  240. xit = 1;
  241. break;
  242. case SC_ESC: // ESC
  243. xit = 1;
  244. break;
  245. case 0x48: // UP
  246. if (hliteY > 5 ||
  247. (!blitY && hliteY))
  248. hliteY--;
  249. else
  250. if (blitY)
  251. blitY--;
  252. break;
  253. case 0x50: // DOWN
  254. if (hliteY > 4 && blitY+10<numInList)
  255. blitY++;
  256. else
  257. if (hliteY < 9 &&
  258. ((blitY+10 == numInList) ||
  259. (hliteY < numInList - 1)))
  260. hliteY++;
  261. break;
  262. case 0x49: // PGUP
  263. blitY -= 9;
  264. if (blitY < 0)
  265. hliteY = blitY = 0;
  266. break;
  267. case 0x51: // PGDN
  268. blitY += 9;
  269. if (blitY+10 > numInList)
  270. {
  271. blitY = numInList - 10;
  272. hliteY = 9;
  273. }
  274. if (numInList < 10)
  275. {
  276. blitY = 0;
  277. hliteY = numInList - 1;
  278. }
  279. break;
  280. }
  281. } while(!xit);
  282. RestoreScreen();
  283. return chosenPhoneNum[0];
  284. }
  285. #ifndef DOOM2
  286. //
  287. // Epsiode radio buttons
  288. //
  289. radio_t mepi[]=
  290. {
  291. {28,3,1},
  292. {28,4,2},
  293. {28,5,3}
  294. };
  295. radiogroup_t mepig=
  296. { &mepi[0],3,&minfo.episode,15,1 };
  297. //
  298. // Skill level radio buttons
  299. //
  300. radio_t mskill[]=
  301. {
  302. {28,7,2},
  303. {28,8,3},
  304. {28,9,4},
  305. {28,10,5}
  306. };
  307. radiogroup_t mskillg=
  308. { &mskill[0],4,&minfo.skillLevel,15,1 };
  309. //
  310. // Mode radio buttons
  311. //
  312. radio_t mdeath[]=
  313. {
  314. {28,12,0},
  315. {28,13,1}
  316. };
  317. radiogroup_t mdeathg=
  318. { &mdeath[0],2,&minfo.deathMatch,15,1 };
  319. //
  320. // Com port radio buttons
  321. //
  322. radio_t mcomport[]=
  323. {
  324. {28,15,1},
  325. {28,16,2},
  326. {42,15,3},
  327. {42,16,4}
  328. };
  329. radiogroup_t mcomportg=
  330. { &mcomport[0],4,&minfo.comport,15,1 };
  331. //
  332. // Connection-type radio buttons
  333. //
  334. radio_t mcomtype[]=
  335. {
  336. {28,18,0},
  337. {28,19,1},
  338. {28,20,2}
  339. };
  340. radiogroup_t mcomtypeg=
  341. { &mcomtype[0],3,&minfo.comtype,15,1 };
  342. #else
  343. //
  344. // Skill level radio buttons
  345. //
  346. radio_t mskill[]=
  347. {
  348. {28,5,2},
  349. {28,6,3},
  350. {28,7,4},
  351. {28,8,5},
  352. };
  353. radiogroup_t mskillg=
  354. { &mskill[0],4,&minfo.skillLevel,15,1 };
  355. //
  356. // Mode radio buttons
  357. //
  358. radio_t mdeath[]=
  359. {
  360. {28,10,0},
  361. {28,11,1}
  362. };
  363. radiogroup_t mdeathg=
  364. { &mdeath[0],2,&minfo.deathMatch,15,1 };
  365. //
  366. // Com port radio buttons
  367. //
  368. radio_t mcomport[]=
  369. {
  370. {28,13,1},
  371. {28,14,2},
  372. {42,13,3},
  373. {42,14,4}
  374. };
  375. radiogroup_t mcomportg=
  376. { &mcomport[0],4,&minfo.comport,15,1 };
  377. //
  378. // Connection-type radio buttons
  379. //
  380. radio_t mcomtype[]=
  381. {
  382. {28,16,0},
  383. {28,17,1},
  384. {28,18,2}
  385. };
  386. radiogroup_t mcomtypeg=
  387. { &mcomtype[0],3,&minfo.comtype,15,1 };
  388. #endif
  389. //
  390. // Menu info
  391. //
  392. enum
  393. {
  394. #ifndef DOOM2
  395. MOD_EPISODE0, MOD_EPISODE1, MOD_EPISODE2,
  396. #endif
  397. MOD_SKILL1, MOD_SKILL2, MOD_SKILL3, MOD_SKILL4,
  398. MOD_DEATHNO, MOD_DEATHYES,
  399. MOD_COM1, MOD_COM2, MOD_COM3, MOD_COM4,
  400. MOD_CONN0, MOD_CONN1, MOD_CONN2,
  401. MOD_MAX
  402. };
  403. item_t cmodemitems[]=
  404. {
  405. #ifndef DOOM2
  406. {MOD_EPISODE0, 31,3,21, -1,-1},
  407. {MOD_EPISODE1, 31,4,21, -1,-1},
  408. {MOD_EPISODE2, 31,5,21, -1,-1},
  409. {MOD_SKILL1, 31,7,20, -1,-1},
  410. {MOD_SKILL2, 31,8,20, -1,-1},
  411. {MOD_SKILL3, 31,9,20, -1,-1},
  412. {MOD_SKILL4, 31,10,20, -1,-1},
  413. {MOD_DEATHNO, 31,12,20,-1,-1},
  414. {MOD_DEATHYES, 31,13,20,-1,-1},
  415. {MOD_COM1, 31,15,4, -1, MOD_COM3},
  416. {MOD_COM2, 31,16,4, -1, MOD_COM4,0,MOD_CONN0},
  417. {MOD_COM3, 45,15,4,MOD_COM1, -1,MOD_DEATHYES},
  418. {MOD_COM4, 45,16,4,MOD_COM2, -1},
  419. {MOD_CONN0, 31,18,20, -1,-1,MOD_COM2},
  420. {MOD_CONN1, 31,19,20, -1,-1},
  421. {MOD_CONN2, 31,20,7, -1,-1}
  422. #else
  423. {MOD_SKILL1, 31,5,20, -1,-1},
  424. {MOD_SKILL2, 31,6,20, -1,-1},
  425. {MOD_SKILL3, 31,7,20, -1,-1},
  426. {MOD_SKILL4, 31,8,20, -1,-1},
  427. {MOD_DEATHNO, 31,10,20,-1,-1},
  428. {MOD_DEATHYES, 31,11,20,-1,-1},
  429. {MOD_COM1, 31,13,4, -1, MOD_COM3},
  430. {MOD_COM2, 31,14,4, -1, MOD_COM4,0,MOD_CONN0},
  431. {MOD_COM3, 45,13,4,MOD_COM1, -1,MOD_DEATHYES},
  432. {MOD_COM4, 45,14,4,MOD_COM2, -1},
  433. {MOD_CONN0, 31,16,20, -1,-1,MOD_COM2},
  434. {MOD_CONN1, 31,17,20, -1,-1},
  435. {MOD_CONN2, 31,18,7, -1,-1}
  436. #endif
  437. };
  438. menu_t cmodemmenu=
  439. {
  440. &cmodemitems[0],
  441. #ifndef DOOM2
  442. MOD_EPISODE0,
  443. #else
  444. MOD_SKILL1,
  445. #endif
  446. MOD_MAX,
  447. 0x7f
  448. };
  449. int ModemConfig(void)
  450. {
  451. short field;
  452. short key;
  453. int rval = 0;
  454. char *args[MAXARGS];
  455. int argcount;
  456. char string[MAXARGS*2][12];
  457. int i;
  458. int level;
  459. #ifndef DOOM2
  460. item_t phonenum = {2,39,20,13,-1,-1};
  461. #else
  462. item_t phonenum = {2,39,18,13,-1,-1};
  463. #endif
  464. char tempstring[16];
  465. minfo = modeminfo; // save copy of modeminfo
  466. SaveScreen();
  467. DrawPup(&cmodem);
  468. //
  469. // Set defaults
  470. //
  471. minfo.skillLevel = 3;
  472. DrawRadios(&mskillg);
  473. minfo.episode = 1;
  474. #ifndef DOOM2
  475. DrawRadios(&mepig);
  476. #endif
  477. minfo.deathMatch = 1;
  478. DrawRadios(&mdeathg);
  479. minfo.comport = comport;
  480. DrawRadios(&mcomportg);
  481. minfo.comtype = 1;
  482. DrawRadios(&mcomtypeg);
  483. strcpy(minfo.phonenum,"");
  484. while(1)
  485. {
  486. SetupMenu(&cmodemmenu);
  487. field = GetMenuInput();
  488. key = menukey;
  489. switch ( key )
  490. {
  491. case KEY_ESC:
  492. rval = -1;
  493. goto func_exit;
  494. case KEY_F2:
  495. if (ChooseOpponentInList())
  496. {
  497. strcpy(minfo.phonenum,chosenPhoneNum);
  498. textcolor(15);
  499. textbackground(0);
  500. Clear(&phonenum);
  501. Pos(&phonenum);
  502. cprintf("%s",minfo.phonenum);
  503. minfo.comtype = 2;
  504. DrawRadios(&mcomtypeg);
  505. gotoxy(1,25);
  506. }
  507. break;
  508. //
  509. // WARP
  510. //
  511. case KEY_F1:
  512. {
  513. level = WarpTime();
  514. if (!level)
  515. continue;
  516. modeminfo = minfo;
  517. M_SaveDefaults();
  518. RestoreScreen();
  519. argcount = 1;
  520. args[0] = "sersetup.exe ";
  521. if (cdrom)
  522. args[argcount++] = "-cdrom";
  523. args[argcount++] = "-skill";
  524. sprintf(string[argcount],"%d",modeminfo.skillLevel);
  525. args[argcount] = string[argcount];
  526. argcount++;
  527. if (!level)
  528. {
  529. #ifndef DOOM2
  530. args[argcount++] = "-episode";
  531. sprintf(string[argcount],"%d",modeminfo.episode);
  532. args[argcount] = string[argcount];
  533. argcount++;
  534. #endif
  535. }
  536. else
  537. {
  538. args[argcount++] = "-warp";
  539. #ifdef DOOM2
  540. sprintf(string[argcount],"%d",level);
  541. args[argcount] = string[argcount];
  542. argcount++;
  543. #else
  544. sprintf(string[argcount],"%d",level>>8);
  545. args[argcount] = string[argcount];
  546. argcount++;
  547. sprintf(string[argcount],"%d",level&0x0f);
  548. args[argcount] = string[argcount];
  549. argcount++;
  550. #endif
  551. }
  552. if (modeminfo.deathMatch)
  553. args[argcount++] = "-deathmatch";
  554. if (nomonsters)
  555. args[argcount++] = "-nomonsters";
  556. if (respawn)
  557. args[argcount++] = "-respawn";
  558. if (deathmatch2 && modeminfo.deathMatch)
  559. args[argcount++] = "-altdeath";
  560. sprintf(string[argcount],"-com%d",modeminfo.comport);
  561. args[argcount] = string[argcount];
  562. argcount++;
  563. //
  564. // IF # IS ENTERED, CALL #
  565. //
  566. if (minfo.phonenum[0])
  567. modeminfo.comtype = 2;
  568. switch(modeminfo.comtype)
  569. {
  570. case 0: // no parameter if already connected!
  571. break;
  572. case 1:
  573. args[argcount++] = "-answer";
  574. break;
  575. case 2:
  576. args[argcount++] = "-dial";
  577. sprintf(string[argcount],"%s",minfo.phonenum);
  578. args[argcount] = string[argcount];
  579. argcount++;
  580. break;
  581. }
  582. for (i = 1;i < myargc; i++)
  583. args[argcount++] = myargv[i];
  584. args[argcount] = NULL;
  585. textbackground(0);
  586. textcolor(7);
  587. clrscr();
  588. execv("sersetup.exe",args);
  589. //
  590. // ERROR EXECing!
  591. //
  592. printf("Problem EXECing SERSETUP for netplay. Need to be in same directory!");
  593. exit(1);
  594. }
  595. break;
  596. exitandsave:
  597. case KEY_F10:
  598. modeminfo = minfo;
  599. M_SaveDefaults();
  600. RestoreScreen();
  601. argcount = 1;
  602. args[0] = "sersetup.exe ";
  603. if (cdrom)
  604. args[argcount++] = "-cdrom";
  605. args[argcount++] = "-skill";
  606. sprintf(string[argcount],"%d",modeminfo.skillLevel);
  607. args[argcount] = string[argcount];
  608. argcount++;
  609. if (modeminfo.deathMatch)
  610. args[argcount++] = "-deathmatch";
  611. #ifndef DOOM2
  612. args[argcount++] = "-episode";
  613. sprintf(string[argcount],"%d",modeminfo.episode);
  614. args[argcount] = string[argcount];
  615. argcount++;
  616. #endif
  617. sprintf(string[argcount],"-com%d",modeminfo.comport);
  618. args[argcount] = string[argcount];
  619. argcount++;
  620. //
  621. // IF # IS ENTERED, CALL #
  622. //
  623. if (minfo.phonenum[0])
  624. modeminfo.comtype = 2;
  625. switch(modeminfo.comtype)
  626. {
  627. case 0: // no parameter if already connected!
  628. break;
  629. case 1:
  630. args[argcount++] = "-answer";
  631. break;
  632. case 2:
  633. args[argcount++] = "-dial";
  634. sprintf(string[argcount],"%s",minfo.phonenum);
  635. args[argcount] = string[argcount];
  636. argcount++;
  637. break;
  638. }
  639. for (i = 1;i < myargc; i++)
  640. args[argcount++] = myargv[i];
  641. args[argcount] = NULL;
  642. textbackground(0);
  643. textcolor(7);
  644. clrscr();
  645. execv("sersetup.exe",args);
  646. //
  647. // ERROR EXECing!
  648. //
  649. printf("Problem EXECing SERSETUP for netplay. Need to be in same directory!");
  650. exit(1);
  651. case KEY_ENTER:
  652. switch ( field )
  653. {
  654. #ifndef DOOM2
  655. //
  656. // Episode
  657. //
  658. case MOD_EPISODE0:
  659. case MOD_EPISODE1:
  660. case MOD_EPISODE2:
  661. minfo.episode = field - MOD_EPISODE0 + 1;
  662. break;
  663. #endif
  664. //
  665. // Skill level
  666. //
  667. case MOD_SKILL1:
  668. case MOD_SKILL2:
  669. case MOD_SKILL3:
  670. case MOD_SKILL4:
  671. minfo.skillLevel = field - MOD_SKILL1 + 2;
  672. break;
  673. //
  674. // Deathmatch
  675. //
  676. case MOD_DEATHNO:
  677. case MOD_DEATHYES:
  678. minfo.deathMatch = field - MOD_DEATHNO;
  679. break;
  680. //
  681. // COM port
  682. //
  683. case MOD_COM1:
  684. case MOD_COM2:
  685. case MOD_COM3:
  686. case MOD_COM4:
  687. comport = minfo.comport = field - MOD_COM1 + 1;
  688. break;
  689. //
  690. // Connection type
  691. //
  692. case MOD_CONN0:
  693. case MOD_CONN1:
  694. minfo.comtype = field - MOD_CONN0;
  695. break;
  696. case MOD_CONN2:
  697. minfo.comtype = 2;
  698. key = EditLine(&phonenum,tempstring,12);
  699. if (key == KEY_ENTER)
  700. strcpy(minfo.phonenum,tempstring);
  701. gotoxy(1,25);
  702. break;
  703. default:
  704. break;
  705. }
  706. #ifndef DOOM2
  707. DrawRadios(&mepig);
  708. #endif
  709. DrawRadios(&mskillg);
  710. DrawRadios(&mdeathg);
  711. DrawRadios(&mcomportg);
  712. DrawRadios(&mcomtypeg);
  713. break;
  714. }
  715. }
  716. func_exit:
  717. RestoreScreen();
  718. return ( rval );
  719. }