home *** CD-ROM | disk | FTP | other *** search
- program multijoy_test;
-
-
- uses crt,
- dos,
- minijoy;
-
-
- procedure hit;
- (* indicate that a stick is newly pushed into the respective direction *)
- begin
- write ('█');
- sound (440);
- delay (10);
- nosound;
- end;
-
-
- procedure init_screen;
- (* initializes screen *)
- var i : byte;
- begin
- clrscr;
- gotoxy (1, 24);
- writeln ('Press ESC to quit');
- for i:=1 to 6 do begin
- gotoxy(i*10 - 2,3);
- write('Joy ',i);
- end;
- end;
-
-
- var i : byte;
- (* multijoy_test *)
- begin
- repeat
- init_screen;
- while not keypressed do begin
- GetAllJoyState;
- for i:=1 to 6 do begin
- with JoyState[i] do begin
-
- gotoxy(i*10,5);
- if uhit
- then hit
- else if y = - 1 then write ('^')
- else write (' ');
-
- gotoxy(i*10-1,6);
- if lhit
- then hit
- else if x = - 1 then write ('<')
- else write (' ');
-
- write(' ');
-
- if rhit
- then hit
- else if x = 1 then write ('>')
- else write (' ');
-
- gotoxy(i*10,7);
- if dhit
- then hit
- else if y = 1 then write ('v')
- else write (' ');
-
- gotoxy(i*10,9);
- if khit
- then hit
- else if knopf then write ('K')
- else write (' ');
-
- gotoxy(i*10,10);
- if xhit
- then hit
- else if xtra then write ('X')
- else write (' ');
-
- end;
- end;
- end;
- until readkey = #27;
- clrscr;
- end.
-