home *** CD-ROM | disk | FTP | other *** search
-
-
- usejoystick()
- int i,joy,lastjoy
-
- loop
- {
- joy = Joystick()
- if (joy & 0x8 && !(lastjoy & 0x8) )
- prints("Lefter: right")
- if (joy & 0x4 && !(lastjoy & 0x4) )
- prints("Lefter: left")
- if (joy & 0x2 && !(lastjoy & 0x2) )
- prints("Lefter: back")
- if (joy & 0x1 && !(lastjoy & 0x1) )
- prints("Lefter: forward")
- if (joy & 0x80 && !(lastjoy & 0x80) )
- prints("Lefter: fire")
- if (joy & 0x800 && !(lastjoy & 0x800) )
- prints("Rightly: right")
- if (joy & 0x400 && !(lastjoy & 0x400) )
- prints("Rightly: left")
- if (joy & 0x200 && !(lastjoy & 0x200) )
- prints("Rightly: back")
- if (joy & 0x100 && !(lastjoy & 0x100) )
- prints("Rightly: forward")
- if (joy & 0x8000 && !(lastjoy & 0x8000) )
- prints("Rightly: fire")
- lastjoy = joy;
- if (inkey())
- break;
- }
-
-