home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
prgtools
/
programm.ing
/
ams__l~1.zoo
/
examples
/
ex3
/
joytest.cc
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-09-05
|
347 b
|
21 lines
#include <Termination.h>
#include <Joystick.h>
main()
{
TrapExceptions(TRUE);
Joystick Stick[2]={0,1};
for (int x=0; x<100; x++) {
for (int s=0; s<=1; s++) {
printf("stick(%d): Way %d = (%d,%d) trigger %s\n",
s,
Stick[s].Way(),
Stick[s].X(),Stick[0].Y(),
Stick[s].Trigger() ? "on" : "off");
}
printf("\n");
}
}