2 * Copyright 2000 Joshua Thielen
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #define BEGINNER_MINES 10
24 #define BEGINNER_COLS 9
25 #define BEGINNER_ROWS 9
27 #define ADVANCED_MINES 40
28 #define ADVANCED_COLS 16
29 #define ADVANCED_ROWS 16
31 #define EXPERT_MINES 99
32 #define EXPERT_COLS 30
33 #define EXPERT_ROWS 16
38 #define BOTTOM_MARGIN 20
39 #define BOARD_WMARGIN 5
40 #define BOARD_HMARGIN 5
44 #define MINE_HEIGHT 16
48 #define FACE_HEIGHT 24
50 #define MAX_PLAYER_NAME_SIZE 31
52 typedef enum { SPRESS_BMP
, COOL_BMP
, DEAD_BMP
, OOH_BMP
, SMILE_BMP
} FACE_BMP
;
54 typedef enum { WAITING
, PLAYING
, GAMEOVER
, WON
} GAME_STATUS
;
57 MPRESS_BMP
, ONE_BMP
, TWO_BMP
, THREE_BMP
, FOUR_BMP
, FIVE_BMP
, SIX_BMP
,
58 SEVEN_BMP
, EIGHT_BMP
, BOX_BMP
, FLAG_BMP
, QUESTION_BMP
, EXPLODE_BMP
,
59 WRONG_BMP
, MINE_BMP
, QPRESS_BMP
62 typedef enum { BEGINNER
, ADVANCED
, EXPERT
, CUSTOM
} DIFFICULTY
;
64 typedef struct tagBOARD
91 char best_name
[3][MAX_PLAYER_NAME_SIZE
+1];
93 DIFFICULTY difficulty
;
101 #define MB_RIGHTDOWN 3
103 #define MB_BOTHDOWN 5
112 unsigned IsPressed
: 1;
113 unsigned FlagType
: 2;
114 unsigned NumMines
: 4;
115 } box
[MAX_COLS
+ 2] [MAX_ROWS
+ 2];
117 /* defines for FlagType */
125 void CheckLevel( BOARD
*p_board
);
127 INT_PTR CALLBACK
CustomDlgProc( HWND hDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
129 INT_PTR CALLBACK
CongratsDlgProc( HWND hDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
131 INT_PTR CALLBACK
TimesDlgProc( HWND hDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);