/* Module : gamecglob.c Author : Kim Moser, Leon Moser Date : System : IBM PC / Borland Turbo C 2.0 Descrip: Global functions and variables for GAME.C */ #include #include #include #include #include "gameglob.h" void halt(char *s) { fprintf(stderr, s); exit(-1); } int keyhit(void) { int ch; if ((ch=getch()) == NULL) /* Assumes that extended key code is next char returned, and that getch() will NOT wait for a key [i.e. key will be available immediately]. */ return (getch()+EXTENDED); else return ch; }