-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefs.h
72 lines (55 loc) · 1.28 KB
/
defs.h
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
#ifndef _DEFS_H_
#define _DEFS_H_
// Target Windows 10
#define UNICODE
#define WINVER 0x0A00
#define _WIN32_WINNT 0x0A00
#define _CRT_RAND_S
#include <windows.h>
#include <uxtheme.h>
#include "resource.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <strsafe.h>
#define LOCAL static
// Includes terminating null character.
#define MAX_STRING 256
#define ROWS 20
#define COLS 10
typedef enum {
BLOCKO,
BLOCKI,
BLOCKS,
BLOCKZ,
BLOCKL,
BLOCKJ,
BLOCKT
} BLOCKTYPE;
typedef enum {
GAMESTATE_PLAY,
GAMESTATE_ELIMINATEFULLROWS
} GAMESTATE;
typedef enum {
COLORTABLE_MONOCHROME,
COLORTABLE_BICOLOR,
COLORTABLE_MULTICOLOR
} COLORTABLEENTRIES;
typedef struct {
WCHAR szName[MAX_STRING];
int nLevel;
int nScore;
} HIGHSCORE;
extern HINSTANCE g_hInstance;
extern HWND g_hwndMain;
extern HIGHSCORE g_hsHighScores[10];
extern WCHAR g_szNewHighScoreName[MAX_STRING];
extern const WORD *g_pBlocks[7];
extern const int g_pFrameCounts[7];
extern int g_nBlockStatistics[7];
void ShowNewHighScoreDialog (void);
void ShowHighScoresDialog (void);
void ShowStatisticsDialog (void);
void ShowAboutDialog (void);
int RandInt (int iMin, int iMax);
#endif /* _DEFS_H_ */