00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KEYTRANS_H
00021 #define KEYTRANS_H
00022
00023 #include "types.h"
00024 #include "SDL.h"
00025
00027 class KeyTrans
00028 {
00029
00030 public:
00031 KeyTrans();
00032 ~KeyTrans() {}
00033
00034 struct JoyAlloc
00035 {
00036 UBYTE joy;
00037 UBYTE orig;
00038 UWORD key;
00039 };
00040 struct SeqPair
00041 {
00042 UBYTE keyval;
00043 bool down;
00044 };
00045
00046 enum Language {German, English};
00047
00048 void init(Language lang=German);
00049
00050 UBYTE get(SDL_Event & event);
00051
00052 bool toggleJoystick();
00053 bool joystickEnabled() {return mJoyEnabled;}
00054
00055 const SeqPair & sequenceVal();
00056 bool hasSequence();
00057
00058 void sequenceCatRun();
00059
00060 private:
00061 SeqPair mSequence[64];
00062 uint mSeqIndex;
00063
00064 static UBYTE mTable[320];
00065
00066 JoyAlloc mJoyAlloc[6];
00067 bool mJoyEnabled;
00068 };
00069
00070 #endif