📄 m_common.h
字号:
///////////////////////////////////
// M_COMMON.H
// Definites some common constant
// Type assignment and so on
//
// PROJECT: Ultra Pac Man
// PROGRAMER: Mal
// LAST UPDATE: Dec. 2nd 2001
///////////////////////////////////
#ifndef MCOMMON
#define MCOMMON
//BOOLEAN & ERR CODES
#define M_FALSE 0
#define M_TRUE 1
#define M_KEY_NOT_PRESSED 0
#define M_KEY_PRESSED 1
#define M_NORMAL 0
#define M_ERR_GRAPHICS_SYSTEM 1
#define M_ERR_MAP_STRUCT 2
#define M_ERR_MAPFILE_OPEN 3
#define M_ERR_MAP_NOT_READY 4
#define M_ERR_MAXFPS_SETTING 5
#define M_ERR_ADDMBC 6
#define M_ERR_ADDEC 7
#define M_ERR_NOTLIVING 8
#define M_ERR_NO_LIVES 9
#define M_ERR_ALREADY_LIVING 10
#define M_ERR_INVALID_DELTALIVES 11
#define M_ERR_ITEM_ALREADY_USED 12
#define M_ERR_ITEM_NOT_READY 13
#define M_ERR_OUT_OF_MEMORY 254
#define M_ERR_UNKNOWN 255
//TEXTURES
#define T_NORMAL_SPRITE 0x01
#define T_ALT_SPRITE 0x02
#define T_NORMAL_DOT 0xF9
#define T_POWER_DOT 0xFE
#define T_SPEED_DOT 0x15
#define T_NORMAL_MONSTER 0xEA
#define T_ALT_MONSTER 0xEF
#define T_WALL 0xDB
#define T_SPACE 0xC5
#define T_AVOID 0x20
#define T_SRP 0xB0
#define T_MRP 0xB1
//OBJ COLORS
#define C_NORMAL_SPRITE LIGHTCYAN
#define C_ALT_SPRITE LIGHTRED
#define C_NORMAL_DOT YELLOW
#define C_POWER_DOT YELLOW
#define C_SPEED_DOT LIGHTGREEN
#define C_NORMAL_MONSTER LIGHTRED
#define C_ALT_MONSTER LIGHTGRAY
#define C_WALL BLUE
#define C_SPACE DARKGRAY
#define C_AVOID BLACK
#define C_SRP MAGENTA
#define C_MRP MAGENTA
//BLOCK TYPE
#define B_WALL 1
#define B_SPACE 2
#define B_NORMAL_DOT 3
#define B_POWER_DOT 4
#define B_SRP 5
#define B_MRP 6
#define B_AVOID 7
#define B_SPEED_DOT 8
//DIRECTIONS
#define DIR_STEADY 0
#define DIR_UP 1
#define DIR_DOWN 2
#define DIR_LEFT 3
#define DIR_RIGHT 4
//KEYCODES
#define K_ENTER 7181
#define K_ESC 283
#define K_SPACE 14624
#define K_TAB 3849
#define K_Y 5465
#define K_y 5497
#define K_N 12622
#define K_n 12654
#define K_INS 20992
#define K_DEL 21248
#define K_HOME 18176
#define K_END 20224
#define K_PGUP 18688
#define K_PGDN 20736
#define K_LEFTARROW 19200
#define K_RIGHTARROW 19712
#define K_UPARROW 18432
#define K_DOWNARROW 20480
#define KP_END 20273
#define KP_DOWNARROW 20530
#define KP_PGDN 20787
#define KP_LEFTARROW 19252
#define KP_5 19509
#define KP_RIGHTARROW 19766
#define KP_HOME 18231
#define KP_UPARROW 18488
#define KP_PGUP 18745
#define KP_SLASH 13615
#define KP_STAR 14122
#define KP_MINUS 18989
#define KP_PLUS 20011
#define KP_ENTER 7181
#define KP_INS 21040
#define KP_DEL 21294
#define K_F1 15104
#define K_F2 15360
#define K_F3 15616
#define K_F4 15872
#define K_F5 16128
#define K_F6 16384
#define K_F7 16640
#define K_F8 16896
#define K_F9 17152
#define K_F10 17408
#define CTRL_C 11779
//MOVER STATES
#define S_NORMAL 1
#define S_POWER 2
#define S_SPEED 3
#define S_WEAK 4
//CONSTANTS
#define DEFAULT_SPRITE_SPEED 2
#define DEFAULT_MONSTER_SPEED 2.06
#define DEFAULT_ADDITION_SCORE 5
#define DEFAULT_MONSTER_SCORE 20
#define DEFAULT_AWARE_DISTANCE 6
#define DEFAULT_ZOMBIE_TIME 15000
#define DEFAULTMAXFPS 30
#define SLOW_FACTOR 0.65
#define MAPMAXX 59
#define MAPMAXY 59
#define DEFAULT_SPRITE_LIVES 3
#define SPEED_EFFECT 1.65
#define SPEEDDOT_RESPAWN_PERIOD 120000
typedef int bool;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -