ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

main.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2000 Joshua Thielen
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00017  */
00018 
00019 #include <windows.h>
00020 
00021 #define BEGINNER_MINES        10
00022 #define BEGINNER_COLS         9
00023 #define BEGINNER_ROWS         9
00024 
00025 #define ADVANCED_MINES        40
00026 #define ADVANCED_COLS         16
00027 #define ADVANCED_ROWS         16
00028 
00029 #define EXPERT_MINES          99
00030 #define EXPERT_COLS           30
00031 #define EXPERT_ROWS           16
00032 
00033 #define MAX_COLS        30
00034 #define MAX_ROWS        24
00035 
00036 #define BOTTOM_MARGIN 20
00037 #define BOARD_WMARGIN 5
00038 #define BOARD_HMARGIN 5
00039 
00040 /* mine defines */
00041 #define MINE_WIDTH       16
00042 #define MINE_HEIGHT      16
00043 #define LED_WIDTH        12
00044 #define LED_HEIGHT       23
00045 #define FACE_WIDTH       24
00046 #define FACE_HEIGHT      24
00047 
00048 #define MAX_PLAYER_NAME_SIZE 31
00049 
00050 typedef enum { SPRESS_BMP, COOL_BMP, DEAD_BMP, OOH_BMP, SMILE_BMP } FACE_BMP;
00051 
00052 typedef enum { WAITING, PLAYING, GAMEOVER, WON } GAME_STATUS;
00053 
00054 typedef enum {
00055      MPRESS_BMP, ONE_BMP, TWO_BMP, THREE_BMP, FOUR_BMP, FIVE_BMP, SIX_BMP,
00056      SEVEN_BMP, EIGHT_BMP, BOX_BMP, FLAG_BMP, QUESTION_BMP, EXPLODE_BMP,
00057      WRONG_BMP, MINE_BMP, QPRESS_BMP
00058 } MINEBMP_OFFSET;
00059 
00060 typedef enum { BEGINNER, ADVANCED, EXPERT, CUSTOM } DIFFICULTY;
00061 
00062 typedef struct tagBOARD
00063 {
00064     BOOL IsMarkQ;
00065     HDC    hdc;
00066     HINSTANCE hInst;
00067     HWND    hWnd;
00068     HBITMAP hMinesBMP;
00069     HBITMAP hFacesBMP;
00070     HBITMAP hLedsBMP;
00071     RECT mines_rect;
00072     RECT face_rect;
00073     RECT timer_rect;
00074     RECT counter_rect;
00075 
00076     unsigned width;
00077     unsigned height;
00078     POINT pos;
00079 
00080     unsigned time;
00081     unsigned num_flags;
00082     unsigned boxes_left;
00083     unsigned num_mines;
00084 
00085     /* difficulty info */
00086     unsigned rows;
00087     unsigned cols;
00088     unsigned mines;
00089     char best_name [3][MAX_PLAYER_NAME_SIZE+1];
00090     DWORD best_time [3];
00091     DIFFICULTY difficulty;
00092 
00093     POINT press;
00094 
00095     /* defines for mb */
00096 #define MB_NONE 0
00097 #define MB_LEFTDOWN 1
00098 #define MB_LEFTUP 2
00099 #define MB_RIGHTDOWN 3
00100 #define MB_RIGHTUP 4
00101 #define MB_BOTHDOWN 5
00102 #define MB_BOTHUP 6
00103     unsigned mb;
00104 
00105     FACE_BMP face_bmp;
00106     GAME_STATUS status;
00107     struct BOX_STRUCT
00108     {
00109         unsigned IsMine    : 1;
00110         unsigned IsPressed : 1;
00111         unsigned FlagType  : 2;
00112         unsigned NumMines  : 4;
00113     } box [MAX_COLS + 2] [MAX_ROWS + 2];
00114 
00115     /* defines for FlagType */
00116 #define NORMAL 0
00117 #define QUESTION 1
00118 #define FLAG 2
00119 #define COMPLETE 3
00120 
00121 } BOARD;
00122 
00123 void CheckLevel( BOARD *p_board );
00124 
00125 INT_PTR CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
00126 
00127 INT_PTR CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
00128 
00129 INT_PTR CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
00130 
00131 
00132 /* end of header */

Generated on Sun May 27 2012 04:16:45 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.