ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
keytrans.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) by Fred Klaus *
3  * development@fkweb.de *
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 *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef SDLTK_KEYTRANS_H
21 #define SDLTK_KEYTRANS_H
22 
23 #include "compspec.h"
24 #include "types.h"
25 #include "SDL.h"
26 
27 namespace sdltk
28 {
29 
31  class KeyTrans final
32  {
33 
34  public:
35  KeyTrans();
37 
38  struct JoyAlloc
39  {
40  tUBYTE joy;
41  tUBYTE orig;
42  tUWORD key;
43  };
44  struct SeqPair
45  {
47  bool down;
48  };
49 
51 
52  void init(Language lang = German);
53 
54  tUBYTE get(SDL_Event & event);
55 
56  bool toggleJoystick();
57  bool joystickEnabled() const {return mJoyEnabled;}
58 
59  const SeqPair & sequenceVal();
60  bool hasSequence();
61 
62  void sequenceCatRun();
63 
64  private:
67 
68  static tUBYTE mTable[320];
69 
70  JoyAlloc mJoyAlloc[6];
72  };
73 
74 } // sdltk
75 
76 #endif // SDLTK_KEYTRANS_H
Definition: keytrans.h:44
void init(Language lang=German)
Definition: keytrans.cpp:262
KeyTrans()
Definition: keytrans.cpp:204
uint mSeqIndex
Definition: keytrans.h:66
Definition: keytrans.h:50
bool toggleJoystick()
Definition: keytrans.cpp:238
~KeyTrans() ROLAND_DEFAULT struct JoyAlloc
Definition: keytrans.h:36
SeqPair mSequence[64]
Definition: keytrans.h:65
Definition: keytrans.h:50
const SeqPair & sequenceVal()
Definition: keytrans.cpp:323
#define ROLAND_DEFAULT
Definition: compspec.h:46
uint8_t tUBYTE
Definition: types.h:74
unsigned int uint
Definition: types.h:121
bool mJoyEnabled
Definition: keytrans.h:71
JoyAlloc mJoyAlloc[6]
Definition: keytrans.h:70
bool joystickEnabled() const
Definition: keytrans.h:57
This class provides Keyboard translaation between CPC/EN/DE/SDL/WIN/LINUX.
Definition: keytrans.h:31
uint16_t tUWORD
Definition: types.h:80
bool down
Definition: keytrans.h:47
static tUBYTE mTable[320]
Definition: keytrans.h:68
the SDL based Stuff
Definition: audio.cpp:22
tUBYTE keyval
Definition: keytrans.h:46
void sequenceCatRun()
Definition: keytrans.cpp:337
Language
Definition: keytrans.h:50
bool hasSequence()
Definition: keytrans.cpp:312