home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 13 / MA_Cover_13.bin / source / c / gbe / joypad.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-12  |  1.3 KB  |  46 lines

  1. /*
  2.  *  gbe - gameboy emulator
  3.  *  Copyright (C) 1999  Chuck Mason, Steven Fuller
  4.  *
  5.  *  This program is free software; you can redistribute it and/or modify
  6.  *  it under the terms of the GNU General Public License as published by
  7.  *  the Free Software Foundation; either version 2 of the License, or
  8.  *  (at your option) any later version.
  9.  *
  10.  *  This program is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *  GNU General Public License for more details.
  14.  *
  15.  *  You should have received a copy of the GNU General Public License
  16.  *  along with this program; if not, write to the Free Software
  17.  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  18.  *
  19.  *
  20.  *  Chuck Mason <chuckjr@sinclair.net>
  21.  *  Steven Fuller <relnev@atdot.org>
  22.  */
  23. #ifndef __KEYPAD_H
  24. #define __KEYPAD_H
  25.  
  26. #define GBE_START 0x80
  27. #define GBE_SELECT 0x40
  28. #define GBE_B 0x20
  29. #define GBE_A 0x10
  30. #define GBE_UP 0x04
  31. #define GBE_DOWN 0x08
  32. #define GBE_LEFT 0x02
  33. #define GBE_RIGHT 0x01
  34.  
  35. #define GBE_O_ESCAPE 0x100
  36.  
  37. extern unsigned char current_joypad;
  38.  
  39. void joypad_init();
  40. void joypad_update();
  41. void joystick_read();
  42. void joypad_press(int);
  43. void joypad_release(int);
  44.  
  45. #endif
  46.