Path: blob/master/libmupen64plus/mupen64plus-video-glide64mk2/src/Glide64/Keys.cpp
2 views
/*1* Glide64 - Glide video plugin for Nintendo 64 emulators.2* Copyright (c) 2002 Dave20013* Copyright (c) 2003-2009 Sergey 'Gonetz' Lipski4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* 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 of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*/1920//****************************************************************21//22// Glide64 - Glide Plugin for Nintendo 64 emulators23// Project started on December 29th, 200124//25// Authors:26// Dave2001, original author, founded the project in 2001, left it in 200227// Gugaman, joined the project in 2002, left it in 200228// Sergey 'Gonetz' Lipski, joined the project in 2002, main author since fall of 200229// Hiroshi 'KoolSmoky' Morii, joined the project in 200730//31//****************************************************************32//33// To modify Glide64:34// * Write your name and (optional)email, commented by your work, so I know who did it, and so that you can find which parts you modified when it comes time to send it to me.35// * Do NOT send me the whole project or file that you modified. Take out your modified code sections, and tell me where to put them. If people sent the whole thing, I would have many different versions, but no idea how to combine them all.36//37//****************************************************************38//39// Keys, used by Glide64.40// Since key codes are different for WinAPI and SDL, this difference is managed here41// Created by Sergey 'Gonetz' Lipski, July 200942//43//****************************************************************4445#include "Gfx_1.3.h"4647Glide64Keys::Glide64Keys()48{49#ifdef __WINDOWS__50_keys[G64_VK_CONTROL] = 0x11;51_keys[G64_VK_ALT] = 0x12;52_keys[G64_VK_INSERT] = 0x2D;53_keys[G64_VK_LBUTTON] = 0x01;54_keys[G64_VK_UP] = 0x26;55_keys[G64_VK_DOWN] = 0x28;56_keys[G64_VK_LEFT] = 0x25;57_keys[G64_VK_RIGHT] = 0x27;58_keys[G64_VK_SPACE] = 0x20;59_keys[G64_VK_BACK] = 0x08;60_keys[G64_VK_SCROLL] = 0x91;61_keys[G64_VK_1] = 0x31;62_keys[G64_VK_2] = 0x32;63_keys[G64_VK_3] = 0x33;64_keys[G64_VK_4] = 0x34;65_keys[G64_VK_5] = 0x35;66_keys[G64_VK_6] = 0x36;67_keys[G64_VK_7] = 0x37;68_keys[G64_VK_8] = 0x38;69_keys[G64_VK_9] = 0x39;70_keys[G64_VK_0] = 0x30;71_keys[G64_VK_A] = 0x41;72_keys[G64_VK_B] = 0x42;73_keys[G64_VK_D] = 0x44;74_keys[G64_VK_G] = 0x47;75_keys[G64_VK_Q] = 0x51;76_keys[G64_VK_R] = 0x52;77_keys[G64_VK_S] = 0x53;78_keys[G64_VK_V] = 0x56;79_keys[G64_VK_W] = 0x57;80#else81_keys[G64_VK_CONTROL] = 306;82_keys[G64_VK_ALT] = 308;83_keys[G64_VK_INSERT] = 277;84_keys[G64_VK_LBUTTON] = 1;85_keys[G64_VK_UP] = 273;86_keys[G64_VK_DOWN] = 274;87_keys[G64_VK_LEFT] = 276;88_keys[G64_VK_RIGHT] = 275;89_keys[G64_VK_SPACE] = 32;90_keys[G64_VK_BACK] = 8;91_keys[G64_VK_SCROLL] = 302;92_keys[G64_VK_1] = 49;93_keys[G64_VK_2] = 50;94_keys[G64_VK_3] = 51;95_keys[G64_VK_4] = 52;96_keys[G64_VK_5] = 53;97_keys[G64_VK_6] = 54;98_keys[G64_VK_7] = 55;99_keys[G64_VK_8] = 56;100_keys[G64_VK_9] = 57;101_keys[G64_VK_0] = 48;102_keys[G64_VK_A] = 97;103_keys[G64_VK_B] = 98;104_keys[G64_VK_D] = 100;105_keys[G64_VK_G] = 103;106_keys[G64_VK_Q] = 113;107_keys[G64_VK_R] = 114;108_keys[G64_VK_S] = 115;109_keys[G64_VK_V] = 118;110_keys[G64_VK_W] = 119;111#endif112}113114115