1 #ifndef GLOBALS_INCLUDED
2 #define GLOBALS_INCLUDED
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #define APPNAME	_T("MATRIX ScreenSaver 2.0")
9 
10 #define DENSITY			24
11 #define DENSITY_MAX		50
12 #define DENSITY_MIN		5
13 
14 // constants inferred from matrix.bmp
15 #define MAX_INTENSITY	5			// number of intensity levels
16 #define NUM_GLYPHS		26			// number of "glyphs" in each level
17 #define GLYPH_WIDTH		14			// width  of each glyph (pixels)
18 #define GLYPH_HEIGHT	14			// height of each glyph (pixels)
19 
20 #define SPEED_MAX		10
21 #define SPEED_MIN		1
22 
23 #define MAXMSG_WIDTH	0x100
24 #define MAXMSG_HEIGHT	0x100
25 #define MAXMSG_LENGTH	64
26 
27 #define MSGSPEED_MAX	500
28 #define MSGSPEED_MIN	50
29 
30 #define MAX_MESSAGES	16
31 
32 #define FONT_MIN	8
33 #define FONT_MAX	30
34 
35 extern TCHAR	g_szMessages[MAX_MESSAGES][MAXMSG_LENGTH];
36 extern int		g_nFontSize;
37 extern TCHAR	g_szFontName[];
38 extern BOOL		g_fFontBold;
39 extern int		g_nNumMessages;
40 extern int		g_nCurrentMessage;
41 extern int		g_nMessageSpeed;
42 extern int		g_nMatrixSpeed;
43 extern int		g_nDensity;
44 extern BOOL		g_fRandomizeMessages;
45 extern HFONT	g_hFont;
46 extern BOOL		g_fScreenSaving;
47 
48 void LoadSettings();
49 void SaveSettings();
50 
51 BOOL ChangePassword(HWND hwnd);
52 BOOL VerifyPassword(HWND hwnd);
53 
54 BOOL Configure(HWND hwndParent);
55 BOOL ScreenSaver(HWND hwndParent);
56 
57 int crc_rand();
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif
64