-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.cpp
110 lines (100 loc) · 2.35 KB
/
config.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef _CONFIG_H
#define _CONFIG_H
#define C_TILE_W 30
#define C_TILE_H 30
#define C_MAP_W 32
#define C_MAP_H 20
enum
{
GAMESTART,
GAMEMENU,
GAMELOOP,
GAMEOVER
};
enum ENUM_GAMEMENU //游戏菜单界面
{
GM_START,
GM_EXIT
};
enum ENUM_GAMEOVERMENU //游戏OVER界面
{
GM_OVER_REPLAY,
GM_OVER_RESTART
};
enum {
PeaShooter,
SunFlower,
WallNut,
Chomper,
Repeater,
Squash,
Jalapeno,
CherryBomb,
NO,
OK,
Grassland
};
enum {
GPeashooter,
GSunFlower,
GWallNut,
GChomper,
GRepeater,
GSquash,
GJalapeno,
GCherryBomb,
GZombie,
GZombieAttack,
GFlagZombie,
GFlagZombieAttack,
GConeheadZombie,
GConeheadZombieAttack,
GBucketheadZombie,
GBucketheadZombieAttack,
GSun,
GWallnut_cracked1,
GWallnut_cracked2,
GChomperAttack,
GChomperDigest,
GMax
};
typedef struct
{
char cName;
char cLife;
char cSun;
char cChomper;
char cSquash;
char cBomb;
POINT ptSite;
}__MAPNATURE;
extern int iTx;
extern int iTy;
extern char flg;
extern HBITMAP hBmpCard[16];
extern Image *imageGif[GMax];
extern HDC hdcImageStore; //用于储存图像的内存DC
extern HDC hdcImageDraw; //用于绘制图像的内存DC
extern HBITMAP hBmpBackground; //游戏时的背景
extern HWND hwndWindow; //windows窗口句柄
extern HBITMAP hBmpLoge; //logo画面 相关位图的句柄,也是指针
extern char cMenuSelecte; // 菜单选项
extern int iGameState; // 游戏状态
extern __MAPNATURE _MAP[5][9];
extern char cCardChoose;
extern char cACardisOK[8];
extern HBITMAP hBmpTest;
extern HBITMAP hBmpOverRestart;
extern bool frameInto(HINSTANCE hinstance,DWORD dwTime);
extern void windowInit(HINSTANCE hinstance);
extern void picturerDraw();
extern bool menuDisplay();
extern bool keyDeal( WPARAM wKey );
extern bool gameProgress( DWORD dwTime );
extern void cardChoose(HWND hWnd,WPARAM wParam,LPARAM lParam);
extern void mapInit();
extern char grasslandEnsure(HWND hWnd,WPARAM wParam,LPARAM lParam);
extern POINT coordLocate(HWND hWnd,WPARAM wParam,LPARAM lParam);
extern void transparentPaint( HDC hdcDest, int nX, int nY, int nWidth, int nHeight, int nSrcX, int nSrcY, COLORREF nBkColor );
extern Image *image;
#endif