GLES1RICE: Update from upstream
[mupen64plus-pandora.git] / source / gles2glide64 / src / Glide64 / Keys.cpp
... / ...
CommitLineData
1/*
2* Glide64 - Glide video plugin for Nintendo 64 emulators.
3* Copyright (c) 2002 Dave2001
4* Copyright (c) 2003-2009 Sergey 'Gonetz' Lipski
5*
6* This program is free software; you can redistribute it and/or modify
7* it under the terms of the GNU General Public License as published by
8* the Free Software Foundation; either version 2 of the License, or
9* any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program; if not, write to the Free Software
18* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*/
20
21//****************************************************************
22//
23// Glide64 - Glide Plugin for Nintendo 64 emulators
24// Project started on December 29th, 2001
25//
26// Authors:
27// Dave2001, original author, founded the project in 2001, left it in 2002
28// Gugaman, joined the project in 2002, left it in 2002
29// Sergey 'Gonetz' Lipski, joined the project in 2002, main author since fall of 2002
30// Hiroshi 'KoolSmoky' Morii, joined the project in 2007
31//
32//****************************************************************
33//
34// To modify Glide64:
35// * 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.
36// * 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.
37//
38//****************************************************************
39//
40// Keys, used by Glide64.
41// Since key codes are different for WinAPI and SDL, this difference is managed here
42// Created by Sergey 'Gonetz' Lipski, July 2009
43//
44//****************************************************************
45
46#include "Gfx_1.3.h"
47
48Glide64Keys::Glide64Keys()
49{
50#ifdef __WINDOWS__
51_keys[G64_VK_CONTROL] = 0x11;
52_keys[G64_VK_ALT] = 0x12;
53_keys[G64_VK_INSERT] = 0x2D;
54_keys[G64_VK_LBUTTON] = 0x01;
55_keys[G64_VK_UP] = 0x26;
56_keys[G64_VK_DOWN] = 0x28;
57_keys[G64_VK_LEFT] = 0x25;
58_keys[G64_VK_RIGHT] = 0x27;
59_keys[G64_VK_SPACE] = 0x20;
60_keys[G64_VK_BACK] = 0x08;
61_keys[G64_VK_SCROLL] = 0x91;
62_keys[G64_VK_1] = 0x31;
63_keys[G64_VK_2] = 0x32;
64_keys[G64_VK_3] = 0x33;
65_keys[G64_VK_4] = 0x34;
66_keys[G64_VK_5] = 0x35;
67_keys[G64_VK_6] = 0x36;
68_keys[G64_VK_7] = 0x37;
69_keys[G64_VK_8] = 0x38;
70_keys[G64_VK_9] = 0x39;
71_keys[G64_VK_0] = 0x30;
72_keys[G64_VK_A] = 0x41;
73_keys[G64_VK_B] = 0x42;
74_keys[G64_VK_D] = 0x44;
75_keys[G64_VK_G] = 0x47;
76_keys[G64_VK_Q] = 0x51;
77_keys[G64_VK_R] = 0x52;
78_keys[G64_VK_S] = 0x53;
79_keys[G64_VK_V] = 0x56;
80_keys[G64_VK_W] = 0x57;
81#else
82_keys[G64_VK_CONTROL] = 306;
83_keys[G64_VK_ALT] = 308;
84_keys[G64_VK_INSERT] = 277;
85_keys[G64_VK_LBUTTON] = 1;
86_keys[G64_VK_UP] = 273;
87_keys[G64_VK_DOWN] = 274;
88_keys[G64_VK_LEFT] = 276;
89_keys[G64_VK_RIGHT] = 275;
90_keys[G64_VK_SPACE] = 32;
91_keys[G64_VK_BACK] = 8;
92_keys[G64_VK_SCROLL] = 302;
93_keys[G64_VK_1] = 49;
94_keys[G64_VK_2] = 50;
95_keys[G64_VK_3] = 51;
96_keys[G64_VK_4] = 52;
97_keys[G64_VK_5] = 53;
98_keys[G64_VK_6] = 54;
99_keys[G64_VK_7] = 55;
100_keys[G64_VK_8] = 56;
101_keys[G64_VK_9] = 57;
102_keys[G64_VK_0] = 48;
103_keys[G64_VK_A] = 97;
104_keys[G64_VK_B] = 98;
105_keys[G64_VK_D] = 100;
106_keys[G64_VK_G] = 103;
107_keys[G64_VK_Q] = 113;
108_keys[G64_VK_R] = 114;
109_keys[G64_VK_S] = 115;
110_keys[G64_VK_V] = 118;
111_keys[G64_VK_W] = 119;
112#endif
113}