home *** CD-ROM | disk | FTP | other *** search
- /* targ.c -- Main program for Targ-Hurt ESP Trainer.
-
- History: rhs 14-mar-87 ... Original
- */
-
- #include <conio.h>
- #include "colors.h"
- #include "mancon.h"
- #include "declares.h"
-
- main()
- { IMPORT int gi_sound;
- char sel;
- breakkey(0); /* Disable break key and ctrl-c. */
-
- disp_crtmode(); /* Set video mode that is appropriate
- to video hardware. */
- while((sel=menu())!='Q')
- switch(sel)
- { case 'H': disp_help();
- break;
- case 'C': mode_clairvoyance();
- break;
- case 'P': mode_precognition();
- break;
- case 'S': if(gi_sound==ON) gi_sound=OFF;
- else gi_sound=ON;
- break;
- }
- border(BLACK);
- clrscrn();
- breakkey(1); /* Re-enable break key. */
- } /* end targ */
-
-
- char menu()
- { IMPORT gi_fg1, gi_bg1;
- char sel = 'x';
- char *valid_sels = {"CHPQS"};
-
- disp_cls(); /* Clear the screen. */
- disp_cursor(ON);
-
- colrprtf(1, gi_fg1, gi_bg1, "\n\n\nTarg-Hurt ESP Trainer\n");
- colrprtf(1, gi_fg1, gi_bg1,
- "Do you want to practice clairvoyance, or precognition?\n\n");
- colrprtf(1, gi_fg1, gi_bg1,
- "C)lairvoyance, P)recogniton, S)ound, H)ow-to-use-it, Q)uit\n");
-
- while(strchr(valid_sels, sel)==NULL)
- { colrprtf(1, gi_fg1, gi_bg1, "\n--->");
- ecokey(&sel);
- sel=toupper(sel);
- }
- return(sel);
- } /* end menu() */
-
-