KEYINTR.H
资源名称:泡泡龙源代码.zip [点击查看]
上传用户:junwei_58
上传日期:2007-05-15
资源大小:79k
文件大小:3k
源码类别:
其他智力游戏
开发平台:
Visual C++
- #ifndef KEYINTR_H
- #define KEYINTR_H
- #include "game.h"
- #ifndef CPPFLAG
- #ifdef __cplusplus
- #define __CPPFLAG ...
- #else
- #define __CPPFLAG
- #endif
- #endif
- #define INTR_KEY 0x09
- #define SUPERKEY 0x01
- #define NORMALKEY 0x02
- #define KEY_esc 0x01
- #define KEY_1 0x02
- #define KEY_2 0x03
- #define KEY_3 0x04
- #define KEY_4 0x05
- #define KEY_5 0x06
- #define KEY_6 0x07
- #define KEY_7 0x08
- #define KEY_8 0x09
- #define KEY_9 0x0a
- #define KEY_0 0x0b
- #define KEY_minus 0x0c
- #define KEY_plus 0x0d
- #define KEY_backspace 0x0e
- #define KEY_tab 0x0f
- #define KEY_q 0x10
- #define KEY_w 0x11
- #define KEY_e 0x12
- #define KEY_r 0x13
- #define KEY_t 0x14
- #define KEY_y 0x15
- #define KEY_u 0x16
- #define KEY_i 0x17
- #define KEY_o 0x18
- #define KEY_p 0x19
- //#define KEY_[ 0x1a
- //#define KEY_] 0x1b
- #define KEY_enter 0x1c
- #define KEY_ctrl 0x1d
- #define KEY_a 0x1e
- #define KEY_s 0x1f
- #define KEY_d 0x20
- #define KEY_f 0x21
- #define KEY_g 0x22
- #define KEY_h 0x23
- #define KEY_j 0x24
- #define KEY_k 0x25
- #define KEY_l 0x26
- #define KEY_semicolon 0x27
- //#define KEY_' 0x28
- //#define KEY_~ 0x29
- #define KEY_Lshift 0x2a
- //#define KEY_ 0x2b
- #define KEY_z 0x2c
- #define KEY_x 0x2d
- #define KEY_c 0x2e
- #define KEY_v 0x2f
- #define KEY_b 0x30
- #define KEY_n 0x31
- #define KEY_m 0x32
- #define KEY_comma 0x33 // ','
- #define KEY_period 0x34 // '.'
- #define KEY_slant 0x35 // '/'
- #define KEY_Rshift 0x36
- #define KEY_alt 0x38
- #define KEY_space 0x39
- #define KEY_capslock 0x3a
- #define KEY_f1 0x3b
- #define KEY_f2 0x3c
- #define KEY_f3 0x3d
- #define KEY_f4 0x3e
- #define KEY_f5 0x3f
- #define KEY_f6 0x40
- #define KEY_f7 0x41
- #define KEY_f8 0x42
- #define KEY_f9 0x43
- #define KEY_f10 0x44
- #define KEY_home 0x47
- #define KEY_up 0x48
- #define KEY_pgup 0x49
- #define KEY_left 0x4b
- #define KEY_right 0x4d
- #define KEY_end 0x4f
- #define KEY_down 0x50
- #define KEY_pgdn 0x51
- #define KEY_ins 0x52
- #define KEY_del 0x53
- #define KEY_f11 0x57
- #define KEY_f12 0x58
- #ifdef EXTERN
- #undef EXTERN
- #endif
- #define EXTERN extern
- #ifdef KEYINTR_CPP
- #undef EXTERN
- #define EXTERN
- #endif
- #define PRIVATE static
- #define PUBLIC
- EXTERN unsigned char keytable[16];
- EXTERN struct {
- uchar status;
- uchar savestatus;
- uchar recentPressKey;
- uchar recentReleaseKey;
- }keyboard;
- /*#ifdef __cplusplus extern "C"{#endif//*/
- PUBLIC EXTERN void installKeyFunc();
- PUBLIC EXTERN void uninstallKeyFunc();
- EXTERN void interrupt (*oldkey)(__CPPFLAG);
- EXTERN void interrupt NewKey(__CPPFLAG);
- EXTERN int getch_Key();
- EXTERN int wait_Key();
- EXTERN void inputString(char *str,int x,int y,int length,STRMode mode=SMLCHARA|CAPCHARA|NUMBER);
- EXTERN void keyLock();
- EXTERN void keyUnlock();
- /*#ifdef __cplusplus }#endif//*/
- #endif