File: misc.c

package info (click to toggle)
gravitywars 1.102-36
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,660 kB
  • sloc: ansic: 4,074; makefile: 53; sh: 52
file content (31 lines) | stat: -rw-r--r-- 619 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* GravityWars 1.1,  (C) Sami Niemi -95 */

#include <stdio.h>
#include <stdlib.h>
#include "misc.h"
#include "vgastubs.h"

/* Wait Any Key */
void waitanykey() {

  while(keyboard_update()) 
    vga_waitretrace();
 
  while(!keyboard_update()) 
    vga_waitretrace();

}

/*------------------------------------------------------------------ doPanic */
/* It also panics if you push a mouse button, in case svgalib crashes.. */

void doPanic() {
  printf("------------------------------\n"
	 "- PANICKING!!!!!!! WHOAAAAA!! -\n"
	 "------------------------------\n");
  keyboard_close();
  mouse_close();
  exit(1);
}