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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
/*
* Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
*
* This file (c) Copyright 2001 Brad Jorsch (anomie@users.sourceforge.net)
*
* This file is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* As a specific exemption, this code may be distributed with and compiled with
* that of the Super Nintendo emulator snes9x. The resulting binaries may be
* also be redistributed as long as the corresponding source is available for
* noncommercial use.
*
* This file is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef CONTROLS_H
#define CONTROLS_H
#include "port.h"
/*************************************************
* Per-port stuff, look in that port's directory
*************************************************/
int S9xStringToKey(char *s);
uint8 S9xStringToModifier(char *s);
char *S9xKeyToString(uint8 key);
char *S9xModifierToString(uint8 key);
bool8 S9xLoadKeymap(char *arg);
bool8 S9xDumpKeymap(char *filename);
/**** End per-port stuff ****/
/* initalize key mapping list */
void S9xInitKeys(void);
/* Add something to the key mapping list */
uint16 S9xGetKey(uint8 keycode, uint8 state);
void S9xAddKey(uint8 keycode, uint8 mask, uint8 mods, uint16 action);
/* Convert between the string and the action (see actions.h) */
char *S9xActionToString(uint16 action);
uint16 S9xStringToAction(char *s);
/* Checks for control files in the following order. Stops after the first.
* romdir/romname.ctl
* The first .ctl inside the zip file (if rom_filename is a zip file)
* freezedir/romname.ctl
* romdir/snes9x.ctl
* freezedir/snes9x.ctl
*/
bool8 S9xCheckForControlSpec(const char *rom_filename);
/* Print the control file */
bool8 S9xDumpControls(char *filename);
#endif
|