Added winemine app.
This commit is contained in:
parent
9217b66587
commit
a3f2380f01
|
@ -6267,6 +6267,7 @@ programs/regtest/Makefile
|
|||
programs/regapi/Makefile
|
||||
programs/view/Makefile
|
||||
programs/wcmd/Makefile
|
||||
programs/winemine/Makefile
|
||||
programs/winhelp/Makefile
|
||||
programs/winver/Makefile
|
||||
rc/Makefile
|
||||
|
@ -6482,6 +6483,7 @@ programs/regtest/Makefile
|
|||
programs/regapi/Makefile
|
||||
programs/view/Makefile
|
||||
programs/wcmd/Makefile
|
||||
programs/winemine/Makefile
|
||||
programs/winhelp/Makefile
|
||||
programs/winver/Makefile
|
||||
rc/Makefile
|
||||
|
|
|
@ -1029,6 +1029,7 @@ programs/regtest/Makefile
|
|||
programs/regapi/Makefile
|
||||
programs/view/Makefile
|
||||
programs/wcmd/Makefile
|
||||
programs/winemine/Makefile
|
||||
programs/winhelp/Makefile
|
||||
programs/winver/Makefile
|
||||
rc/Makefile
|
||||
|
|
|
@ -10,6 +10,7 @@ SUBDIRS = \
|
|||
regtest \
|
||||
view \
|
||||
wcmd \
|
||||
winemine \
|
||||
winhelp \
|
||||
winver
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Makefile
|
||||
rsrc.s
|
||||
winemine
|
||||
winemine.spec.c
|
|
@ -0,0 +1,39 @@
|
|||
DEFS = -DWINELIB
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = none
|
||||
PROGRAMS = winemine
|
||||
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XLIB) $(LIBS)
|
||||
WRCEXTRA = -s -p winemine
|
||||
|
||||
LICENSELANG = En
|
||||
|
||||
C_SRCS = \
|
||||
main.c \
|
||||
dialog.c
|
||||
|
||||
|
||||
SPEC_SRCS = winemine.spec
|
||||
|
||||
RC_SRCS = rsrc.rc
|
||||
|
||||
all: check_wrc check_winestub $(PROGRAMS)
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
# Override resource compiler rules
|
||||
.rc.s:
|
||||
$(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -o $*.s
|
||||
|
||||
winemine: $(OBJS)
|
||||
$(CC) -o winemine $(OBJS) $(LDOPTIONS) $(ALL_LIBS)
|
||||
|
||||
install::
|
||||
$(INSTALL_PROGRAM) winemine $(bindir)/winemine
|
||||
|
||||
uninstall::
|
||||
$(RM) $(bindir)/winemine
|
||||
|
||||
### Dependencies:
|
|
@ -0,0 +1,18 @@
|
|||
WineMine README
|
||||
|
||||
WineMine, copyright March 2000, Joshua Thielen
|
||||
WineMine is to be distributed under the Wine License
|
||||
See the Wine License for further information.
|
||||
|
||||
|
||||
This is minesweeper for wine...
|
||||
Enjoy. I wrote it because it rhymes ;).
|
||||
|
||||
KNOWN BUGS:
|
||||
Chokes on fastest times names greater than 16 characters long, must have
|
||||
something to do with GetDlgItemText.
|
||||
|
||||
No help file.
|
||||
|
||||
UNKNOWN BUGS:
|
||||
???
|
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* WineMine (dialog.c)
|
||||
*
|
||||
* Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
#include "main.h"
|
||||
#include "dialog.h"
|
||||
#include "resource.h"
|
||||
|
||||
BOOL CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
BOOL IsRet;
|
||||
static BOARD *p_board;
|
||||
|
||||
switch( uMsg ) {
|
||||
case WM_INITDIALOG:
|
||||
p_board = (BOARD*) lParam;
|
||||
SetDlgItemInt( hDlg, IDC_EDITROWS, p_board->rows, FALSE );
|
||||
SetDlgItemInt( hDlg, IDC_EDITCOLS, p_board->cols, FALSE );
|
||||
SetDlgItemInt( hDlg, IDC_EDITMINES, p_board->mines, FALSE );
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD( wParam ) ) {
|
||||
case IDOK:
|
||||
p_board->rows = GetDlgItemInt( hDlg, IDC_EDITROWS, &IsRet, FALSE );
|
||||
p_board->cols = GetDlgItemInt( hDlg, IDC_EDITCOLS, &IsRet, FALSE );
|
||||
p_board->mines = GetDlgItemInt( hDlg, IDC_EDITMINES, &IsRet, FALSE );
|
||||
CheckLevel( p_board );
|
||||
EndDialog( hDlg, 0 );
|
||||
return TRUE;
|
||||
|
||||
case IDCANCEL:
|
||||
EndDialog( hDlg, 0 );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
static BOARD *p_board;
|
||||
|
||||
switch( uMsg ) {
|
||||
case WM_INITDIALOG:
|
||||
p_board = (BOARD*) lParam;
|
||||
SetDlgItemText( hDlg, IDC_EDITNAME,
|
||||
p_board->best_name[p_board->difficulty] );
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD( wParam ) ) {
|
||||
case IDOK:
|
||||
GetDlgItemText( hDlg, IDC_EDITNAME,
|
||||
p_board->best_name[p_board->difficulty],
|
||||
sizeof( p_board->best_name[p_board->difficulty] ) );
|
||||
EndDialog( hDlg, 0 );
|
||||
return TRUE;
|
||||
|
||||
case IDCANCEL:
|
||||
EndDialog( hDlg, 0 );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
static BOARD *p_board;
|
||||
unsigned i;
|
||||
|
||||
switch( uMsg ) {
|
||||
case WM_INITDIALOG:
|
||||
p_board = (BOARD*) lParam;
|
||||
|
||||
/* set best names */
|
||||
for( i = 0; i < 3; i++ )
|
||||
SetDlgItemText( hDlg, (IDC_NAME1) + i, p_board->best_name[i] );
|
||||
|
||||
/* set best times */
|
||||
for( i = 0; i < 3; i++ )
|
||||
SetDlgItemInt( hDlg, (IDC_TIME1) + i, p_board->best_time[i], FALSE );
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD( wParam ) ) {
|
||||
case IDOK:
|
||||
EndDialog( hDlg, 0 );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( uMsg ) {
|
||||
case WM_INITDIALOG:
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD( wParam ) ) {
|
||||
case IDOK:
|
||||
EndDialog( hDlg, 0 );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* WineMine (dialog.h)
|
||||
*
|
||||
* Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
|
||||
BOOL CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
BOOL CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
BOOL CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
|
@ -0,0 +1,970 @@
|
|||
/*
|
||||
* WineMine (main.c)
|
||||
*
|
||||
* Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <windows.h>
|
||||
#include "main.h"
|
||||
#include "dialog.h"
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow )
|
||||
{
|
||||
MSG msg;
|
||||
WNDCLASS wc;
|
||||
HWND hWnd;
|
||||
HACCEL haccel;
|
||||
char appname[9];
|
||||
|
||||
LoadString( hInst, IDS_APPNAME, appname, sizeof(appname));
|
||||
|
||||
wc.style = 0;
|
||||
wc.lpfnWndProc = MainProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = hInst;
|
||||
wc.hIcon = LoadIcon( hInst, appname );
|
||||
wc.hCursor = LoadCursor( NULL, IDI_APPLICATION );
|
||||
wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH );
|
||||
wc.lpszMenuName = "MENU_WINEMINE";
|
||||
wc.lpszClassName = appname;
|
||||
|
||||
if (!RegisterClass(&wc)) exit(1);
|
||||
hWnd = CreateWindow( appname, appname,
|
||||
WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
NULL, NULL, hInst, NULL );
|
||||
|
||||
if (!hWnd) exit(1);
|
||||
|
||||
ShowWindow( hWnd, cmdshow );
|
||||
UpdateWindow( hWnd );
|
||||
|
||||
SetTimer( hWnd, ID_TIMER, 1000, NULL );
|
||||
haccel = LoadAccelerators( hInst, appname );
|
||||
|
||||
while( GetMessage(&msg, NULL, 0, 0) ) {
|
||||
if (!TranslateAccelerator( hWnd, haccel, &msg ))
|
||||
TranslateMessage( &msg );
|
||||
|
||||
DispatchMessage( &msg );
|
||||
}
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
PAINTSTRUCT ps;
|
||||
HMENU hMenu;
|
||||
static BOARD board;
|
||||
|
||||
switch( msg ) {
|
||||
case WM_CREATE:
|
||||
board.hInst = ((LPCREATESTRUCT) lParam)->hInstance;
|
||||
board.hWnd = hWnd;
|
||||
InitBoard( &board );
|
||||
CreateBoard( &board );
|
||||
return 0;
|
||||
|
||||
case WM_PAINT:
|
||||
hdc = BeginPaint( hWnd, &ps );
|
||||
DrawBoard( hdc, &ps, &board );
|
||||
EndPaint( hWnd, &ps );
|
||||
return 0;
|
||||
|
||||
case WM_MOVE:
|
||||
board.pos.x = (unsigned) LOWORD(lParam);
|
||||
board.pos.y = (unsigned) HIWORD(lParam);
|
||||
return 0;
|
||||
|
||||
case WM_DESTROY:
|
||||
SaveBoard( &board );
|
||||
PostQuitMessage( 0 );
|
||||
return 0;
|
||||
|
||||
case WM_TIMER:
|
||||
if( board.status == PLAYING ) {
|
||||
board.time++;
|
||||
RedrawWindow( hWnd, &board.timer_rect, NULL,
|
||||
RDW_INVALIDATE | RDW_UPDATENOW );
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
if( wParam & MK_RBUTTON )
|
||||
msg = WM_MBUTTONDOWN;
|
||||
TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), msg );
|
||||
SetCapture( hWnd );
|
||||
return 0;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
if( wParam & MK_RBUTTON )
|
||||
msg = WM_MBUTTONUP;
|
||||
TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), msg );
|
||||
ReleaseCapture();
|
||||
return 0;
|
||||
|
||||
case WM_RBUTTONDOWN:
|
||||
if( wParam & MK_LBUTTON ) {
|
||||
board.press.x = 0;
|
||||
board.press.y = 0;
|
||||
msg = WM_MBUTTONDOWN;
|
||||
}
|
||||
TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), msg );
|
||||
return 0;
|
||||
|
||||
case WM_RBUTTONUP:
|
||||
if( wParam & MK_LBUTTON )
|
||||
msg = WM_MBUTTONUP;
|
||||
TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), msg );
|
||||
return 0;
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
if( wParam & MK_LBUTTON )
|
||||
TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), WM_LBUTTONDOWN );
|
||||
if( (wParam & MK_LBUTTON) && (wParam & MK_RBUTTON) )
|
||||
TestBoard( hWnd, &board, LOWORD(lParam), HIWORD(lParam), WM_MBUTTONDOWN );
|
||||
return 0;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam)) {
|
||||
case IDM_NEW:
|
||||
CreateBoard( &board );
|
||||
return 0;
|
||||
|
||||
case IDM_MARKQ:
|
||||
hMenu = GetMenu( hWnd );
|
||||
board.IsMarkQ = !board.IsMarkQ;
|
||||
if( board.IsMarkQ )
|
||||
CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED );
|
||||
else
|
||||
CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED );
|
||||
return 0;
|
||||
|
||||
case IDM_BEGINNER:
|
||||
SetDifficulty( &board, BEGINNER );
|
||||
CreateBoard( &board );
|
||||
return 0;
|
||||
|
||||
case IDM_ADVANCED:
|
||||
SetDifficulty( &board, ADVANCED );
|
||||
CreateBoard( &board );
|
||||
return 0;
|
||||
|
||||
case IDM_EXPERT:
|
||||
SetDifficulty( &board, EXPERT );
|
||||
CreateBoard( &board );
|
||||
return 0;
|
||||
|
||||
case IDM_CUSTOM:
|
||||
SetDifficulty( &board, CUSTOM );
|
||||
CreateBoard( &board );
|
||||
return 0;
|
||||
|
||||
case IDM_EXIT:
|
||||
SendMessage( hWnd, WM_CLOSE, 0, 0);
|
||||
return 0;
|
||||
|
||||
case IDM_TIMES:
|
||||
DialogBoxParam( board.hInst, "DLG_TIMES", hWnd,
|
||||
TimesDlgProc, (LPARAM) &board);
|
||||
return 0;
|
||||
|
||||
case IDM_ABOUT:
|
||||
DialogBox( board.hInst, "DLG_ABOUT", hWnd, AboutDlgProc );
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return( DefWindowProc( hWnd, msg, wParam, lParam ));
|
||||
}
|
||||
|
||||
void InitBoard( BOARD *p_board )
|
||||
{
|
||||
HMENU hMenu;
|
||||
|
||||
p_board->hMinesBMP = LoadBitmap( p_board->hInst, "mines");
|
||||
p_board->hFacesBMP = LoadBitmap( p_board->hInst, "faces");
|
||||
p_board->hLedsBMP = LoadBitmap( p_board->hInst, "leds");
|
||||
|
||||
LoadBoard( p_board );
|
||||
|
||||
if( p_board->pos.x < (unsigned) GetSystemMetrics( SM_CXFIXEDFRAME ))
|
||||
p_board->pos.x = GetSystemMetrics( SM_CXFIXEDFRAME );
|
||||
|
||||
if( p_board->pos.x > (unsigned) (GetSystemMetrics( SM_CXSCREEN )
|
||||
- GetSystemMetrics( SM_CXFIXEDFRAME ))) {
|
||||
p_board->pos.x = GetSystemMetrics( SM_CXSCREEN )
|
||||
- GetSystemMetrics( SM_CXFIXEDFRAME );
|
||||
}
|
||||
|
||||
if( p_board->pos.y < (unsigned) (GetSystemMetrics( SM_CYMENU )
|
||||
+ GetSystemMetrics( SM_CYCAPTION )
|
||||
+ GetSystemMetrics( SM_CYFIXEDFRAME ))) {
|
||||
p_board->pos.y = GetSystemMetrics( SM_CYMENU ) +
|
||||
GetSystemMetrics( SM_CYCAPTION ) +
|
||||
GetSystemMetrics( SM_CYFIXEDFRAME );
|
||||
}
|
||||
|
||||
if( p_board->pos.y > (unsigned) (GetSystemMetrics( SM_CYSCREEN )
|
||||
- GetSystemMetrics( SM_CYFIXEDFRAME ))) {
|
||||
p_board->pos.y = GetSystemMetrics( SM_CYSCREEN )
|
||||
- GetSystemMetrics( SM_CYFIXEDFRAME );
|
||||
}
|
||||
|
||||
hMenu = GetMenu( p_board->hWnd );
|
||||
CheckMenuItem( hMenu, IDM_BEGINNER + (unsigned) p_board->difficulty,
|
||||
MF_CHECKED );
|
||||
if( p_board->IsMarkQ )
|
||||
CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED );
|
||||
else
|
||||
CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED );
|
||||
CheckLevel( p_board );
|
||||
}
|
||||
|
||||
void LoadBoard( BOARD *p_board )
|
||||
{
|
||||
DWORD size;
|
||||
DWORD type;
|
||||
HKEY hkey;
|
||||
char data[16];
|
||||
char key_name[8];
|
||||
unsigned i;
|
||||
|
||||
|
||||
RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Wine\\WineMine",
|
||||
0, KEY_QUERY_VALUE, &hkey );
|
||||
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, "Xpos", NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS ) {
|
||||
p_board->pos.x = atoi( data );
|
||||
}
|
||||
else
|
||||
p_board->pos.x = GetSystemMetrics( SM_CXFIXEDFRAME );
|
||||
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, "Ypos", NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
|
||||
p_board->pos.x = atoi( data );
|
||||
else
|
||||
p_board->pos.x = GetSystemMetrics( SM_CYMENU )
|
||||
+ GetSystemMetrics( SM_CYCAPTION )
|
||||
+ GetSystemMetrics( SM_CYFIXEDFRAME );
|
||||
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, "Rows", NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
|
||||
p_board->rows = atoi( data );
|
||||
else
|
||||
p_board->rows = BEGINNER_ROWS;
|
||||
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, "Cols", NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
|
||||
p_board->cols = atoi( data );
|
||||
else
|
||||
p_board->cols = BEGINNER_COLS;
|
||||
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, "Mines", NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
|
||||
p_board->mines = atoi( data );
|
||||
else
|
||||
p_board->rows = BEGINNER_ROWS;
|
||||
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, "Difficulty", NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
|
||||
p_board->difficulty = (DIFFICULTY) atoi( data );
|
||||
else
|
||||
p_board->difficulty = BEGINNER;
|
||||
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, "MarkQ", NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data, (LPDWORD) &size ) == ERROR_SUCCESS )
|
||||
p_board->IsMarkQ = atoi( data );
|
||||
else
|
||||
p_board->IsMarkQ = TRUE;
|
||||
|
||||
for( i = 0; i < 3; i++ ) {
|
||||
wsprintf( key_name, "Name%d", i );
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, key_name, NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data,
|
||||
(LPDWORD) &size ) == ERROR_SUCCESS )
|
||||
strncpy( p_board->best_name[i], data, sizeof( data ) );
|
||||
else
|
||||
wsprintf( p_board->best_name[i], "Nobody");
|
||||
}
|
||||
|
||||
for( i = 0; i < 3; i++ ) {
|
||||
wsprintf( key_name, "Time%d", i );
|
||||
size = sizeof( data );
|
||||
if( RegQueryValueEx( hkey, key_name, NULL, (LPDWORD) &type,
|
||||
(LPBYTE) data,
|
||||
(LPDWORD) &size ) == ERROR_SUCCESS )
|
||||
p_board->best_time[i] = atoi( data );
|
||||
else
|
||||
p_board->best_time[i] = 999;
|
||||
}
|
||||
RegCloseKey( hkey );
|
||||
}
|
||||
|
||||
void SaveBoard( BOARD *p_board )
|
||||
{
|
||||
DWORD disp;
|
||||
HKEY hkey;
|
||||
SECURITY_ATTRIBUTES sa;
|
||||
unsigned i;
|
||||
char data[16];
|
||||
char key_name[8];
|
||||
|
||||
if( RegCreateKeyEx( HKEY_LOCAL_MACHINE,
|
||||
"Software\\The WINE team\\WineMine", 0, NULL,
|
||||
REG_OPTION_NON_VOLATILE, KEY_WRITE, &sa,
|
||||
&hkey, &disp ) != ERROR_SUCCESS)
|
||||
return;
|
||||
|
||||
wsprintf( data, "%d", p_board->pos.x );
|
||||
RegSetValueEx( hkey, "Xpos", 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
|
||||
wsprintf( data, "%d", p_board->pos.x );
|
||||
RegSetValueEx( hkey, "Ypos", 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
|
||||
wsprintf( data, "%d", (int) p_board->difficulty );
|
||||
RegSetValueEx( hkey, "Difficulty", 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
|
||||
wsprintf( data, "%d", p_board->rows );
|
||||
RegSetValueEx( hkey, "Rows", 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
|
||||
wsprintf( data, "%d", p_board->cols );
|
||||
RegSetValueEx( hkey, "Cols", 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
|
||||
wsprintf( data, "%d", p_board->mines );
|
||||
RegSetValueEx( hkey, "Mines", 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
|
||||
wsprintf( data, "%d", (int) p_board->IsMarkQ );
|
||||
RegSetValueEx( hkey, "MarkQ", 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
|
||||
for( i = 0; i < 3; i++ ) {
|
||||
wsprintf( key_name, "Name%u", i );
|
||||
strncpy( data, p_board->best_name[i], sizeof( data ) );
|
||||
RegSetValueEx( hkey, key_name, 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
}
|
||||
|
||||
for( i = 0; i < 3; i++ ) {
|
||||
wsprintf( key_name, "Time%u", i );
|
||||
wsprintf( data, "%d", p_board->best_time[i] );
|
||||
RegSetValueEx( hkey, key_name, 0, REG_SZ, (LPBYTE) data,
|
||||
sizeof( data ));
|
||||
}
|
||||
RegCloseKey( hkey );
|
||||
}
|
||||
|
||||
void SetDifficulty( BOARD *p_board, DIFFICULTY difficulty )
|
||||
{
|
||||
HMENU hMenu = GetMenu( p_board->hWnd );
|
||||
|
||||
CheckMenuItem( hMenu, IDM_BEGINNER + p_board->difficulty, MF_UNCHECKED );
|
||||
p_board->difficulty = difficulty;
|
||||
CheckMenuItem( hMenu, IDM_BEGINNER + difficulty, MF_CHECKED );
|
||||
|
||||
switch( difficulty ) {
|
||||
case BEGINNER:
|
||||
p_board->cols = BEGINNER_COLS;
|
||||
p_board->rows = BEGINNER_ROWS;
|
||||
p_board->mines = BEGINNER_MINES;
|
||||
break;
|
||||
|
||||
case ADVANCED:
|
||||
p_board->cols = ADVANCED_COLS;
|
||||
p_board->rows = ADVANCED_ROWS;
|
||||
p_board->mines = ADVANCED_MINES;
|
||||
break;
|
||||
|
||||
case EXPERT:
|
||||
p_board->cols = EXPERT_COLS;
|
||||
p_board->rows = EXPERT_ROWS;
|
||||
p_board->mines = EXPERT_MINES;
|
||||
break;
|
||||
|
||||
case CUSTOM:
|
||||
DialogBoxParam( p_board->hInst, "DLG_CUSTOM", p_board->hWnd,
|
||||
CustomDlgProc, (LPARAM) p_board);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CreateBoard( BOARD *p_board )
|
||||
{
|
||||
int left, top, bottom, right, wnd_x, wnd_y, wnd_width, wnd_height;
|
||||
|
||||
p_board->mb = MB_NONE;
|
||||
p_board->boxes_left = p_board->cols * p_board->rows - p_board->mines;
|
||||
p_board->num_flags = 0;
|
||||
|
||||
CreateBoxes( p_board );
|
||||
|
||||
p_board->width = p_board->cols * MINE_WIDTH + BOARD_WMARGIN * 2;
|
||||
|
||||
p_board->height = p_board->rows * MINE_HEIGHT + LED_HEIGHT
|
||||
+ BOARD_HMARGIN * 3;
|
||||
|
||||
wnd_x = p_board->pos.x - GetSystemMetrics( SM_CXFIXEDFRAME );
|
||||
wnd_y = p_board->pos.y - GetSystemMetrics( SM_CYMENU )
|
||||
- GetSystemMetrics( SM_CYCAPTION )
|
||||
- GetSystemMetrics( SM_CYFIXEDFRAME );
|
||||
wnd_width = p_board->width
|
||||
+ GetSystemMetrics( SM_CXFIXEDFRAME ) * 2;
|
||||
wnd_height = p_board->height
|
||||
+ GetSystemMetrics( SM_CYMENU )
|
||||
+ GetSystemMetrics( SM_CYCAPTION )
|
||||
+ GetSystemMetrics( SM_CYFIXEDFRAME ) * 2;
|
||||
|
||||
/* setting the mines rectangle boundary */
|
||||
left = BOARD_WMARGIN;
|
||||
top = BOARD_HMARGIN * 2 + LED_HEIGHT;
|
||||
right = left + p_board->cols * MINE_WIDTH;
|
||||
bottom = top + p_board->rows * MINE_HEIGHT;
|
||||
SetRect( &p_board->mines_rect, left, top, right, bottom );
|
||||
|
||||
/* setting the face rectangle boundary */
|
||||
left = p_board->width / 2 - FACE_WIDTH / 2;
|
||||
top = BOARD_HMARGIN;
|
||||
right = left + FACE_WIDTH;
|
||||
bottom = top + FACE_HEIGHT;
|
||||
SetRect( &p_board->face_rect, left, top, right, bottom );
|
||||
|
||||
/* setting the timer rectangle boundary */
|
||||
left = BOARD_WMARGIN;
|
||||
top = BOARD_HMARGIN;
|
||||
right = left + LED_WIDTH * 3;
|
||||
bottom = top + LED_HEIGHT;
|
||||
SetRect( &p_board->timer_rect, left, top, right, bottom );
|
||||
|
||||
/* setting the counter rectangle boundary */
|
||||
left = p_board->width - BOARD_WMARGIN - LED_WIDTH * 3;
|
||||
top = BOARD_HMARGIN;
|
||||
right = p_board->width - BOARD_WMARGIN;
|
||||
bottom = top + LED_HEIGHT;
|
||||
SetRect( &p_board->counter_rect, left, top, right, bottom );
|
||||
|
||||
p_board->status = WAITING;
|
||||
p_board->face_bmp = SMILE_BMP;
|
||||
p_board->time = 0;
|
||||
|
||||
MoveWindow( p_board->hWnd, wnd_x, wnd_y, wnd_width, wnd_height, TRUE );
|
||||
RedrawWindow( p_board->hWnd, NULL, NULL,
|
||||
RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE );
|
||||
}
|
||||
|
||||
|
||||
void CheckLevel( BOARD *p_board )
|
||||
{
|
||||
if( p_board->rows < BEGINNER_ROWS )
|
||||
p_board->rows = BEGINNER_ROWS;
|
||||
|
||||
if( p_board->rows > MAX_ROWS )
|
||||
p_board->rows = MAX_ROWS;
|
||||
|
||||
if( p_board->cols < BEGINNER_COLS )
|
||||
p_board->cols = BEGINNER_COLS;
|
||||
|
||||
if( p_board->cols > MAX_COLS )
|
||||
p_board->cols = MAX_COLS;
|
||||
|
||||
if( p_board->mines < BEGINNER_MINES )
|
||||
p_board->mines = BEGINNER_MINES;
|
||||
|
||||
if( p_board->mines > p_board->cols * p_board->rows - 1 )
|
||||
p_board->mines = p_board->cols * p_board->rows - 1;
|
||||
}
|
||||
|
||||
|
||||
void CreateBoxes( BOARD *p_board )
|
||||
{
|
||||
int i, j;
|
||||
unsigned col, row;
|
||||
|
||||
srand( (unsigned) time( NULL ) );
|
||||
|
||||
/* Create the boxes...
|
||||
* We actually create them with an empty border,
|
||||
* so special care doesn't have to be taken on the edges
|
||||
*/
|
||||
|
||||
for( col = 0; col <= p_board->cols + 1; col++ )
|
||||
for( row = 0; row <= p_board->rows + 1; row++ ) {
|
||||
p_board->box[col][row].IsPressed = FALSE;
|
||||
p_board->box[col][row].IsMine = FALSE;
|
||||
p_board->box[col][row].FlagType = NORMAL;
|
||||
p_board->box[col][row].NumMines = 0;
|
||||
}
|
||||
|
||||
/* create mines */
|
||||
i = 0;
|
||||
while( (unsigned) i < p_board->mines ) {
|
||||
col = (int) (p_board->cols * (float) rand() / RAND_MAX + 1);
|
||||
row = (int) (p_board->rows * (float) rand() / RAND_MAX + 1);
|
||||
|
||||
if( !p_board->box[col][row].IsMine ) {
|
||||
i++;
|
||||
p_board->box[col][row].IsMine = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we label the remaining boxes with the
|
||||
* number of mines surrounding them.
|
||||
*/
|
||||
|
||||
for( col = 1; col < p_board->cols + 1; col++ )
|
||||
for( row = 1; row < p_board->rows + 1; row++ ) {
|
||||
for( i = -1; i <= 1; i++ )
|
||||
for( j = -1; j <= 1; j++ ) {
|
||||
if( p_board->box[col + i][row + j].IsMine ) {
|
||||
p_board->box[col][row].NumMines++ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DrawMines ( HDC hdc, BOARD *p_board )
|
||||
{
|
||||
unsigned col, row;
|
||||
|
||||
for( row = 1; row < p_board->rows + 1; row++ )
|
||||
for( col = 1; col < p_board->cols + 1; col++ )
|
||||
DrawMine( hdc, p_board, col, row, FALSE );
|
||||
}
|
||||
|
||||
void DrawMine( HDC hdc, BOARD *p_board, unsigned col, unsigned row, BOOL IsPressed )
|
||||
{
|
||||
BITMAP bm ;
|
||||
HDC hMemDC ;
|
||||
MINEBMP_OFFSET offset = BOX_BMP;
|
||||
|
||||
|
||||
if( col == 0 || col > p_board->cols || row == 0 || row > p_board->rows )
|
||||
return;
|
||||
|
||||
if( p_board->status == GAMEOVER ) {
|
||||
if( p_board->box[col][row].IsMine ) {
|
||||
switch( p_board->box[col][row].FlagType ) {
|
||||
case FLAG:
|
||||
offset = FLAG_BMP;
|
||||
break;
|
||||
case COMPLETE:
|
||||
offset = EXPLODE_BMP;
|
||||
break;
|
||||
case NORMAL:
|
||||
offset = MINE_BMP;
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch( p_board->box[col][row].FlagType ) {
|
||||
case QUESTION:
|
||||
offset = QUESTION_BMP;
|
||||
break;
|
||||
case FLAG:
|
||||
offset = WRONG_BMP;
|
||||
break;
|
||||
case NORMAL:
|
||||
offset = BOX_BMP;
|
||||
}
|
||||
}
|
||||
}
|
||||
else { /* WAITING or PLAYING */
|
||||
switch( p_board->box[col][row].FlagType ) {
|
||||
case QUESTION:
|
||||
if( !IsPressed )
|
||||
offset = QUESTION_BMP;
|
||||
else
|
||||
offset = QPRESS_BMP;
|
||||
break;
|
||||
case FLAG:
|
||||
offset = FLAG_BMP;
|
||||
break;
|
||||
case NORMAL:
|
||||
if( !IsPressed )
|
||||
offset = BOX_BMP;
|
||||
else
|
||||
offset = MPRESS_BMP;
|
||||
}
|
||||
}
|
||||
|
||||
if( p_board->box[col][row].FlagType == COMPLETE
|
||||
&& !p_board->box[col][row].IsMine )
|
||||
offset = (MINEBMP_OFFSET) p_board->box[col][row].NumMines;
|
||||
|
||||
hMemDC = CreateCompatibleDC( hdc );
|
||||
SelectObject (hMemDC, p_board->hMinesBMP);
|
||||
GetObject (p_board->hMinesBMP, sizeof (BITMAP), (PSTR) &bm);
|
||||
|
||||
BitBlt( hdc,
|
||||
(col - 1) * MINE_WIDTH + p_board->mines_rect.left,
|
||||
(row - 1) * MINE_HEIGHT + p_board->mines_rect.top,
|
||||
MINE_WIDTH, MINE_HEIGHT,
|
||||
hMemDC, 0, offset * MINE_HEIGHT, SRCCOPY);
|
||||
|
||||
DeleteDC( hMemDC );
|
||||
}
|
||||
|
||||
void DrawLeds( HDC hdc, BOARD *p_board, int number, int x, int y )
|
||||
{
|
||||
HDC hMemDC;
|
||||
BITMAP bm ;
|
||||
unsigned led[3], i;
|
||||
int count;
|
||||
|
||||
count = number;
|
||||
if( count < 1000 ) {
|
||||
if( count >= 0 ) {
|
||||
led[0] = count / 100 ;
|
||||
count -= led[0] * 100;
|
||||
}
|
||||
else {
|
||||
led[0] = 10; /* negative sign */
|
||||
count = -count;
|
||||
}
|
||||
led[1] = count / 10;
|
||||
count -= led[1] * 10;
|
||||
led[2] = count;
|
||||
}
|
||||
else {
|
||||
for( i = 0; i < 3; i++ )
|
||||
led[i] = 10;
|
||||
}
|
||||
|
||||
/* use unlit led if not playing */
|
||||
if( p_board->status == WAITING )
|
||||
for( i = 0; i < 3; i++ )
|
||||
led[i] = 11;
|
||||
|
||||
hMemDC = CreateCompatibleDC( hdc );
|
||||
SelectObject (hMemDC, p_board->hLedsBMP);
|
||||
GetObject (p_board->hLedsBMP, sizeof (BITMAP), (PSTR) &bm);
|
||||
|
||||
for( i = 0; i < 3; i++ ) {
|
||||
BitBlt( hdc,
|
||||
i * LED_WIDTH + x,
|
||||
y,
|
||||
LED_WIDTH,
|
||||
LED_HEIGHT,
|
||||
hMemDC,
|
||||
0,
|
||||
led[i] * LED_HEIGHT,
|
||||
SRCCOPY);
|
||||
}
|
||||
DeleteDC( hMemDC );
|
||||
}
|
||||
|
||||
|
||||
void DrawFace( HDC hdc, BOARD *p_board )
|
||||
{
|
||||
BITMAP bm ;
|
||||
HDC hMemDC ;
|
||||
|
||||
hMemDC = CreateCompatibleDC( hdc );
|
||||
SelectObject (hMemDC, p_board->hFacesBMP);
|
||||
GetObject (p_board->hFacesBMP, sizeof (BITMAP), (PSTR) &bm);
|
||||
|
||||
BitBlt( hdc,
|
||||
p_board->face_rect.left,
|
||||
p_board->face_rect.top,
|
||||
FACE_WIDTH,
|
||||
FACE_HEIGHT,
|
||||
hMemDC, 0, p_board->face_bmp * FACE_HEIGHT, SRCCOPY);
|
||||
|
||||
DeleteDC( hMemDC );
|
||||
}
|
||||
|
||||
|
||||
void DrawBoard( HDC hdc, PAINTSTRUCT *ps, BOARD *p_board )
|
||||
{
|
||||
RECT tmp_rect;
|
||||
|
||||
if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->counter_rect ) )
|
||||
DrawLeds( hdc, p_board, p_board->mines - p_board->num_flags,
|
||||
p_board->counter_rect.left,
|
||||
p_board->counter_rect.top );
|
||||
|
||||
if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->timer_rect ) )
|
||||
DrawLeds( hdc, p_board, p_board->time,
|
||||
p_board->timer_rect.left,
|
||||
p_board->timer_rect.top );
|
||||
|
||||
if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->face_rect ) )
|
||||
DrawFace( hdc, p_board );
|
||||
|
||||
if( IntersectRect( &tmp_rect, &ps->rcPaint, &p_board->mines_rect ) )
|
||||
DrawMines( hdc, p_board );
|
||||
}
|
||||
|
||||
|
||||
void TestBoard( HWND hWnd, BOARD *p_board, unsigned x, unsigned y, int msg )
|
||||
{
|
||||
POINT pt;
|
||||
|
||||
|
||||
pt.x = x;
|
||||
pt.y = y;
|
||||
|
||||
if( PtInRect( &p_board->mines_rect, pt ) && p_board->status != GAMEOVER
|
||||
&& p_board->status != WON )
|
||||
TestMines( p_board, pt, msg );
|
||||
else {
|
||||
UnpressBoxes( p_board,
|
||||
p_board->press.x,
|
||||
p_board->press.y );
|
||||
p_board->press.x = 0;
|
||||
p_board->press.y = 0;
|
||||
}
|
||||
|
||||
if( p_board->boxes_left == 0 ) {
|
||||
p_board->status = WON;
|
||||
|
||||
if( p_board->difficulty != CUSTOM &&
|
||||
p_board->time < p_board->best_time[p_board->difficulty] ) {
|
||||
p_board->best_time[p_board->difficulty] = p_board->time;
|
||||
|
||||
DialogBoxParam( p_board->hInst, "DLG_CONGRATS", hWnd,
|
||||
CongratsDlgProc, (LPARAM) p_board);
|
||||
|
||||
DialogBoxParam( p_board->hInst, "DLG_TIMES", hWnd,
|
||||
TimesDlgProc, (LPARAM) p_board);
|
||||
}
|
||||
}
|
||||
TestFace( p_board, pt, msg );
|
||||
}
|
||||
|
||||
void TestMines( BOARD *p_board, POINT pt, int msg )
|
||||
{
|
||||
BOOL draw = TRUE;
|
||||
unsigned col, row;
|
||||
|
||||
col = (pt.x - p_board->mines_rect.left) / MINE_WIDTH + 1;
|
||||
row = (pt.y - p_board->mines_rect.top ) / MINE_HEIGHT + 1;
|
||||
|
||||
switch ( msg ) {
|
||||
case WM_LBUTTONDOWN:
|
||||
if( p_board->press.x != col || p_board->press.y != row ) {
|
||||
UnpressBox( p_board,
|
||||
p_board->press.x, p_board->press.y );
|
||||
p_board->press.x = col;
|
||||
p_board->press.y = row;
|
||||
PressBox( p_board, col, row );
|
||||
}
|
||||
draw = FALSE;
|
||||
break;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
if( p_board->press.x != col || p_board->press.y != row )
|
||||
UnpressBox( p_board,
|
||||
p_board->press.x, p_board->press.y );
|
||||
p_board->press.x = 0;
|
||||
p_board->press.y = 0;
|
||||
if( p_board->box[col][row].FlagType != FLAG )
|
||||
p_board->status = PLAYING;
|
||||
CompleteBox( p_board, col, row );
|
||||
break;
|
||||
|
||||
case WM_MBUTTONDOWN:
|
||||
PressBoxes( p_board, col, row );
|
||||
draw = FALSE;
|
||||
break;
|
||||
|
||||
case WM_MBUTTONUP:
|
||||
if( p_board->press.x != col || p_board->press.y != row )
|
||||
UnpressBoxes( p_board,
|
||||
p_board->press.x, p_board->press.y );
|
||||
p_board->press.x = 0;
|
||||
p_board->press.y = 0;
|
||||
CompleteBoxes( p_board, col, row );
|
||||
break;
|
||||
|
||||
case WM_RBUTTONDOWN:
|
||||
AddFlag( p_board, col, row );
|
||||
break;
|
||||
}
|
||||
if( draw )
|
||||
{
|
||||
RedrawWindow( p_board->hWnd, NULL, NULL,
|
||||
RDW_INVALIDATE | RDW_UPDATENOW );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TestFace( BOARD *p_board, POINT pt, int msg )
|
||||
{
|
||||
if( p_board->status == PLAYING || p_board->status == WAITING ) {
|
||||
if( msg == WM_LBUTTONDOWN || msg == WM_MBUTTONDOWN )
|
||||
p_board->face_bmp = OOH_BMP;
|
||||
else p_board->face_bmp = SMILE_BMP;
|
||||
}
|
||||
|
||||
if( p_board->status == GAMEOVER )
|
||||
p_board->face_bmp = DEAD_BMP;
|
||||
|
||||
if( p_board->status == WON )
|
||||
p_board->face_bmp = COOL_BMP;
|
||||
|
||||
if( PtInRect( &p_board->face_rect, pt ) ) {
|
||||
if( msg == WM_LBUTTONDOWN )
|
||||
p_board->face_bmp = SPRESS_BMP;
|
||||
|
||||
if( msg == WM_LBUTTONUP )
|
||||
CreateBoard( p_board );
|
||||
}
|
||||
RedrawWindow( p_board->hWnd, &p_board->face_rect, NULL,
|
||||
RDW_INVALIDATE | RDW_UPDATENOW );
|
||||
}
|
||||
|
||||
|
||||
void CompleteBox( BOARD *p_board, unsigned col, unsigned row )
|
||||
{
|
||||
int i, j;
|
||||
|
||||
if( p_board->box[col][row].FlagType != COMPLETE &&
|
||||
p_board->box[col][row].FlagType != FLAG &&
|
||||
col > 0 && col < p_board->cols + 1 &&
|
||||
row > 0 && row < p_board->rows + 1 ) {
|
||||
p_board->box[col][row].FlagType = COMPLETE;
|
||||
|
||||
if( p_board->box[col][row].IsMine ) {
|
||||
p_board->face_bmp = DEAD_BMP;
|
||||
p_board->status = GAMEOVER;
|
||||
}
|
||||
else if( p_board->status != GAMEOVER )
|
||||
p_board->boxes_left--;
|
||||
|
||||
if( p_board->box[col][row].NumMines == 0 )
|
||||
{
|
||||
for( i = -1; i <= 1; i++ )
|
||||
for( j = -1; j <= 1; j++ )
|
||||
CompleteBox( p_board, col + i, row + j );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CompleteBoxes( BOARD *p_board, unsigned col, unsigned row )
|
||||
{
|
||||
unsigned numFlags = 0;
|
||||
int i, j;
|
||||
|
||||
if( p_board->box[col][row].FlagType == COMPLETE ) {
|
||||
for( i = -1; i <= 1; i++ )
|
||||
for( j = -1; j <= 1; j++ ) {
|
||||
if( p_board->box[col+i][row+j].FlagType == FLAG )
|
||||
numFlags++;
|
||||
}
|
||||
|
||||
if( numFlags == p_board->box[col][row].NumMines ) {
|
||||
for( i = -1; i <= 1; i++ )
|
||||
for( j = -1; j <= 1; j++ ) {
|
||||
if( p_board->box[col+i][row+j].FlagType != FLAG )
|
||||
CompleteBox( p_board, col+i, row+j );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AddFlag( BOARD *p_board, unsigned col, unsigned row )
|
||||
{
|
||||
if( p_board->box[col][row].FlagType != COMPLETE ) {
|
||||
switch( p_board->box[col][row].FlagType ) {
|
||||
case FLAG:
|
||||
if( p_board->IsMarkQ )
|
||||
p_board->box[col][row].FlagType = QUESTION;
|
||||
else
|
||||
p_board->box[col][row].FlagType = NORMAL;
|
||||
p_board->num_flags--;
|
||||
break;
|
||||
|
||||
case QUESTION:
|
||||
p_board->box[col][row].FlagType = NORMAL;
|
||||
break;
|
||||
|
||||
default:
|
||||
p_board->box[col][row].FlagType = FLAG;
|
||||
p_board->num_flags++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PressBox( BOARD *p_board, unsigned col, unsigned row )
|
||||
{
|
||||
HDC hdc;
|
||||
|
||||
hdc = GetDC( p_board->hWnd );
|
||||
DrawMine( hdc, p_board, col, row, TRUE );
|
||||
ReleaseDC( p_board->hWnd, hdc );
|
||||
}
|
||||
|
||||
|
||||
void PressBoxes( BOARD *p_board, unsigned col, unsigned row )
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for( i = -1; i <= 1; i++ )
|
||||
for( j = -1; j <= 1; j++ ) {
|
||||
p_board->box[col + i][row + j].IsPressed = TRUE;
|
||||
PressBox( p_board, col + i, row + j );
|
||||
}
|
||||
|
||||
for( i = -1; i <= 1; i++ )
|
||||
for( j = -1; j <= 1; j++ ) {
|
||||
if( !p_board->box[p_board->press.x + i][p_board->press.y + j].IsPressed )
|
||||
UnpressBox( p_board, p_board->press.x + i, p_board->press.y + j );
|
||||
}
|
||||
|
||||
for( i = -1; i <= 1; i++ )
|
||||
for( j = -1; j <= 1; j++ ) {
|
||||
p_board->box[col + i][row + j].IsPressed = FALSE;
|
||||
PressBox( p_board, col + i, row + j );
|
||||
}
|
||||
|
||||
p_board->press.x = col;
|
||||
p_board->press.y = row;
|
||||
}
|
||||
|
||||
|
||||
void UnpressBox( BOARD *p_board, unsigned col, unsigned row )
|
||||
{
|
||||
HDC hdc;
|
||||
|
||||
hdc = GetDC( p_board->hWnd );
|
||||
DrawMine( hdc, p_board, col, row, FALSE );
|
||||
ReleaseDC( p_board->hWnd, hdc );
|
||||
}
|
||||
|
||||
|
||||
void UnpressBoxes( BOARD *p_board, unsigned col, unsigned row )
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for( i = -1; i <= 1; i++ )
|
||||
for( j = -1; j <= 1; j++ ) {
|
||||
UnpressBox( p_board, col + i, row + j );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
#include <windows.h>
|
||||
|
||||
#define BEGINNER_MINES 10
|
||||
#define BEGINNER_COLS 8
|
||||
#define BEGINNER_ROWS 8
|
||||
|
||||
#define ADVANCED_MINES 40
|
||||
#define ADVANCED_COLS 16
|
||||
#define ADVANCED_ROWS 16
|
||||
|
||||
#define EXPERT_MINES 99
|
||||
#define EXPERT_COLS 30
|
||||
#define EXPERT_ROWS 16
|
||||
|
||||
#define MAX_COLS 30
|
||||
#define MAX_ROWS 24
|
||||
|
||||
#define BOTTOM_MARGIN 20
|
||||
#define BOARD_WMARGIN 5
|
||||
#define BOARD_HMARGIN 5
|
||||
|
||||
/* mine defines */
|
||||
#define MINE_WIDTH 16
|
||||
#define MINE_HEIGHT 16
|
||||
#define LED_WIDTH 12
|
||||
#define LED_HEIGHT 23
|
||||
#define FACE_WIDTH 24
|
||||
#define FACE_HEIGHT 24
|
||||
|
||||
typedef enum { SPRESS_BMP, COOL_BMP, DEAD_BMP, OOH_BMP, SMILE_BMP } FACE_BMP;
|
||||
|
||||
typedef enum { WAITING, PLAYING, GAMEOVER, WON } GAME_STATUS;
|
||||
|
||||
typedef enum {
|
||||
MPRESS_BMP, ONE_BMP, TWO_BMP, THREE_BMP, FOUR_BMP, FIVE_BMP, SIX_BMP,
|
||||
SEVEN_BMP, EIGHT_BMP, BOX_BMP, FLAG_BMP, QUESTION_BMP, EXPLODE_BMP,
|
||||
WRONG_BMP, MINE_BMP, QPRESS_BMP
|
||||
} MINEBMP_OFFSET;
|
||||
|
||||
typedef enum { BEGINNER, ADVANCED, EXPERT, CUSTOM } DIFFICULTY;
|
||||
|
||||
typedef struct tagBOARD
|
||||
{
|
||||
BOOL IsMarkQ;
|
||||
HDC hdc;
|
||||
HINSTANCE hInst;
|
||||
HWND hWnd;
|
||||
HBITMAP hMinesBMP;
|
||||
HBITMAP hFacesBMP;
|
||||
HBITMAP hLedsBMP;
|
||||
RECT mines_rect;
|
||||
RECT face_rect;
|
||||
RECT timer_rect;
|
||||
RECT counter_rect;
|
||||
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
POINT pos;
|
||||
|
||||
unsigned time;
|
||||
unsigned num_flags;
|
||||
unsigned boxes_left;
|
||||
unsigned num_mines;
|
||||
|
||||
/* difficulty info */
|
||||
unsigned rows;
|
||||
unsigned cols;
|
||||
unsigned mines;
|
||||
char best_name [3][16];
|
||||
unsigned best_time [3];
|
||||
DIFFICULTY difficulty;
|
||||
|
||||
POINT press;
|
||||
|
||||
/* defines for mb */
|
||||
#define MB_NONE 0
|
||||
#define MB_LEFTDOWN 1
|
||||
#define MB_LEFTUP 2
|
||||
#define MB_RIGHTDOWN 3
|
||||
#define MB_RIGHTUP 4
|
||||
#define MB_BOTHDOWN 5
|
||||
#define MB_BOTHUP 6
|
||||
unsigned mb;
|
||||
|
||||
FACE_BMP face_bmp;
|
||||
GAME_STATUS status;
|
||||
struct BOX_STRUCT
|
||||
{
|
||||
unsigned IsMine : 1;
|
||||
unsigned IsPressed : 1;
|
||||
unsigned FlagType : 2;
|
||||
unsigned NumMines : 4;
|
||||
} box [MAX_COLS + 2] [MAX_ROWS + 2];
|
||||
|
||||
/* defines for FlagType */
|
||||
#define NORMAL 0
|
||||
#define QUESTION 1
|
||||
#define FLAG 2
|
||||
#define COMPLETE 3
|
||||
|
||||
} BOARD;
|
||||
|
||||
void ExitApp( int error );
|
||||
|
||||
void InitBoard( BOARD *p_board );
|
||||
|
||||
void LoadBoard( BOARD *p_board );
|
||||
|
||||
void SaveBoard( BOARD *p_board );
|
||||
|
||||
void SetDifficulty( BOARD *p_board, DIFFICULTY difficulty );
|
||||
|
||||
void CheckLevel( BOARD *p_board );
|
||||
|
||||
void CreateBoard( BOARD *p_board );
|
||||
|
||||
void CreateBoxes( BOARD *p_board );
|
||||
|
||||
void TestBoard( HWND hWnd, BOARD *p_board, unsigned x, unsigned y, int msg );
|
||||
|
||||
void TestMines( BOARD *p_board, POINT pt, int msg );
|
||||
|
||||
void TestFace( BOARD *p_board, POINT pt, int msg );
|
||||
|
||||
void DrawBoard( HDC hdc, PAINTSTRUCT *ps, BOARD *p_board );
|
||||
|
||||
void DrawMines( HDC hdc, BOARD *p_board );
|
||||
|
||||
void DrawMine( HDC hdc, BOARD *p_board, unsigned col, unsigned row, BOOL IsPressed );
|
||||
|
||||
void AddFlag( BOARD *p_board, unsigned col, unsigned row );
|
||||
|
||||
void CompleteBox( BOARD *p_board, unsigned col, unsigned row );
|
||||
|
||||
void CompleteBoxes( BOARD *p_board, unsigned col, unsigned row );
|
||||
|
||||
void PressBox( BOARD *p_board, unsigned col, unsigned row );
|
||||
|
||||
void PressBoxes( BOARD *p_board, unsigned col, unsigned row );
|
||||
|
||||
void UnpressBox( BOARD *p_board, unsigned col, unsigned row );
|
||||
|
||||
void UnpressBoxes( BOARD *p_board, unsigned col, unsigned row );
|
||||
|
||||
void UpdateTimer( BOARD *p_board );
|
||||
|
||||
void DrawLeds( HDC hdc, BOARD *p_board, int number, int x, int y);
|
||||
|
||||
void DrawFace( HDC hdc, BOARD *p_board );
|
||||
|
||||
LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
BOOL CALLBACK CongratsDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
BOOL CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
/* end of header */
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* WineMine (resource.h)
|
||||
*
|
||||
* Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
|
||||
#define ID_TIMER 1000
|
||||
|
||||
/* menu defines */
|
||||
#define IDM_NEW 1001
|
||||
#define IDM_EXIT 1002
|
||||
#define IDM_TIMES 1003
|
||||
#define IDM_ABOUT 1004
|
||||
#define IDM_BEGINNER 1005
|
||||
#define IDM_ADVANCED 1006
|
||||
#define IDM_EXPERT 1007
|
||||
#define IDM_CUSTOM 1008
|
||||
#define IDM_MARKQ 1009
|
||||
|
||||
#define IDC_TIME1 1011
|
||||
#define IDC_TIME2 1012
|
||||
#define IDC_TIME3 1013
|
||||
#define IDC_NAME1 1014
|
||||
#define IDC_NAME2 1015
|
||||
#define IDC_NAME3 1016
|
||||
|
||||
#define IDC_EDITNAME 1021
|
||||
|
||||
#define IDC_EDITCOLS 1031
|
||||
#define IDC_EDITROWS 1032
|
||||
#define IDC_EDITMINES 1033
|
||||
|
||||
#define IDS_APPNAME 1101
|
|
@ -0,0 +1,539 @@
|
|||
/*
|
||||
* WineMine (rsrc.rc)
|
||||
*
|
||||
* Copyright 2000 Joshua Thielen <jt85296@ltu.edu>
|
||||
* To be distributed under the Wine License
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
|
||||
WINEMINE ICON MOVEABLE
|
||||
{
|
||||
'00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02'
|
||||
'00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
|
||||
'00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00'
|
||||
'00 00 80 00 80 00 80 80 00 00 80 80 80 00 C0 C0'
|
||||
'C0 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00'
|
||||
'00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 22 22'
|
||||
'22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 20 00 00 02 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 00 00 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 20 02 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 20 02 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 20 02 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 20 02 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 20 07 77 70 07 77 70 02 22 22 22 22 22 22'
|
||||
'22 22 20 07 77 00 07 77 70 02 22 22 22 22 22 22'
|
||||
'22 22 27 70 00 00 00 00 07 72 22 22 22 22 22 22'
|
||||
'22 22 27 70 00 00 00 00 07 72 22 22 22 22 22 22'
|
||||
'20 22 27 70 00 00 00 00 07 72 22 02 22 22 22 22'
|
||||
'00 02 27 00 00 00 00 00 07 72 20 00 22 22 22 20'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 02 22 22 20'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 02 22 22 22'
|
||||
'00 02 27 00 00 00 0F F0 08 82 20 00 22 22 22 22'
|
||||
'20 22 27 70 00 00 0F F0 08 82 20 02 22 22 22 22'
|
||||
'22 22 27 70 00 00 00 F0 08 82 22 22 22 22 22 22'
|
||||
'22 22 27 70 00 00 00 00 08 82 22 22 22 22 22 22'
|
||||
'22 22 20 07 77 00 00 88 80 02 22 22 22 22 22 22'
|
||||
'22 22 20 07 78 80 08 88 80 02 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 20 02 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 20 02 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 20 02 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 20 02 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 00 00 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 20 00 00 02 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 22 22 22 22 22 22 22 22 22 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
}
|
||||
|
||||
FACES BITMAP MOVEABLE
|
||||
{
|
||||
'42 4D 16 06 00 00 00 00 00 00 76 00 00 00 28 00'
|
||||
'00 00 18 00 00 00 78 00 00 00 01 00 04 00 00 00'
|
||||
'00 00 A0 05 00 00 C4 0E 00 00 C4 0E 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80'
|
||||
'00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80'
|
||||
'00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
|
||||
'00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
|
||||
'00 00 FF FF FF 00 77 77 77 77 77 77 77 77 77 77'
|
||||
'77 77 F7 77 77 77 77 77 77 77 77 77 77 77 FF 00'
|
||||
'00 00 00 00 00 00 00 00 00 77 FF 00 00 00 00 00'
|
||||
'00 00 00 00 00 77 FF 00 00 00 00 00 00 00 00 00'
|
||||
'00 77 FF 00 00 00 0B BB BB B3 00 00 00 77 FF 00'
|
||||
'00 00 BB BB BB BB 30 00 00 77 FF 00 00 0B B0 00'
|
||||
'00 0B B3 00 00 77 FF 00 00 BB 0B BB BB B0 BB 30'
|
||||
'00 77 FF 00 0B BB BB BB BB BB BB B3 00 77 FF 00'
|
||||
'0B BB BB BB BB BB BB B3 00 77 FF 00 0B BB BB BB'
|
||||
'BB BB BB B3 00 77 FF 00 0B BB BB BB BB BB BB B3'
|
||||
'00 77 FF 00 0B BB B0 0B B0 0B BB B3 00 77 FF 00'
|
||||
'0B BB B0 0B B0 0B BB B3 00 77 FF 00 00 BB B0 0B'
|
||||
'B0 0B BB 30 00 77 FF 00 00 0B BB BB BB BB B3 00'
|
||||
'00 77 FF 00 00 00 BB BB BB BB 30 00 00 77 FF 00'
|
||||
'00 00 0B BB BB B3 00 00 00 77 FF 00 70 00 00 00'
|
||||
'00 00 00 00 00 77 FF 00 07 00 00 00 00 00 00 00'
|
||||
'00 77 FF 00 00 00 00 00 00 00 00 00 00 77 FF FF'
|
||||
'FF FF FF FF FF FF FF FF FF F7 FF FF FF FF FF FF'
|
||||
'FF FF FF FF FF FF 77 77 77 77 77 77 77 77 77 77'
|
||||
'77 77 F7 77 77 77 77 77 77 77 77 77 77 77 FF 00'
|
||||
'00 00 00 00 00 00 00 00 00 77 FF 00 00 00 00 00'
|
||||
'00 00 00 00 00 77 FF 00 00 00 00 00 00 00 00 00'
|
||||
'00 77 FF 00 00 00 0B BB BB B3 00 00 00 77 FF 00'
|
||||
'00 00 BB BB BB BB 30 00 00 77 FF 00 00 0B BB 00'
|
||||
'00 BB B3 00 00 77 FF 00 00 0B B0 00 00 0B BB 30'
|
||||
'00 77 FF 00 0B 00 BB 00 00 BB B0 03 00 77 FF 00'
|
||||
'0B B0 BB BB BB BB 00 B3 00 77 FF 00 0B B0 0B BB'
|
||||
'BB B0 0B B3 00 77 FF 00 0B BB 00 BB BB B0 BB B3'
|
||||
'00 77 FF 00 0B BB B0 BB BB 00 BB B3 00 77 FF 00'
|
||||
'0B BB 00 0B B0 00 0B B3 00 77 FF 00 00 BB 00 00'
|
||||
'B0 00 BB 30 00 77 FF 00 00 0B B0 00 B0 0B B3 00'
|
||||
'00 77 FF 00 00 00 BB BB BB BB 30 00 00 77 FF 00'
|
||||
'70 00 0B BB BB B3 00 00 00 77 FF 00 07 00 00 00'
|
||||
'00 00 00 00 00 77 FF 00 00 00 00 00 00 00 00 00'
|
||||
'00 77 FF 00 00 00 00 00 00 00 00 00 00 77 FF FF'
|
||||
'FF FF FF FF FF FF FF FF FF F7 FF FF FF FF FF FF'
|
||||
'FF FF FF FF FF FF 77 77 77 77 77 77 77 77 77 77'
|
||||
'77 77 F7 77 77 77 77 77 77 77 77 77 77 77 FF 00'
|
||||
'00 00 00 00 00 00 00 00 00 77 FF 00 00 00 00 00'
|
||||
'00 00 00 00 00 77 FF 00 00 00 00 00 00 00 00 00'
|
||||
'00 77 FF 00 00 00 07 77 77 73 00 00 00 77 FF 00'
|
||||
'00 00 77 77 77 77 30 00 00 77 FF 00 00 07 70 77'
|
||||
'77 07 73 00 00 77 FF 00 00 77 77 00 00 77 77 30'
|
||||
'00 77 FF 00 07 77 77 77 77 77 77 73 00 77 FF 00'
|
||||
'07 77 77 77 77 77 77 73 00 77 FF 00 07 77 77 77'
|
||||
'77 77 77 73 00 77 FF 00 07 77 77 77 77 77 77 73'
|
||||
'00 77 FF 00 07 77 07 07 70 70 77 73 00 77 FF 00'
|
||||
'07 77 70 77 77 07 77 73 00 77 FF 00 00 77 07 07'
|
||||
'70 70 77 30 00 77 FF 00 00 07 77 77 77 77 73 00'
|
||||
'00 77 FF 00 00 00 77 77 77 77 30 00 00 77 FF 00'
|
||||
'70 00 07 77 77 73 00 00 00 77 FF 00 07 00 00 00'
|
||||
'00 00 00 00 00 77 FF 00 00 00 00 00 00 00 00 00'
|
||||
'00 77 FF 00 00 00 00 00 00 00 00 00 00 77 FF FF'
|
||||
'FF FF FF FF FF FF FF FF FF F7 FF FF FF FF FF FF'
|
||||
'FF FF FF FF FF FF 77 77 77 77 77 77 77 77 77 77'
|
||||
'77 77 F7 77 77 77 77 77 77 77 77 77 77 77 FF 00'
|
||||
'00 00 00 00 00 00 00 00 00 77 FF 00 00 00 00 00'
|
||||
'00 00 00 00 00 77 FF 00 00 00 00 00 00 00 00 00'
|
||||
'00 77 FF 00 00 00 0B BB BB B3 00 00 00 77 FF 00'
|
||||
'00 00 BB BB BB BB 30 00 00 77 FF 00 00 0B B0 00'
|
||||
'00 0B B3 00 00 77 FF 00 00 BB 0B BB BB B0 BB 30'
|
||||
'00 77 FF 00 0B B0 BB BB BB BB 0B B3 00 77 FF 00'
|
||||
'0B BB BB BB BB BB BB B3 00 77 FF 00 0B BB BB BB'
|
||||
'BB BB BB B3 00 77 FF 00 0B BB BB BB BB BB BB B3'
|
||||
'00 77 FF 00 0B BB B0 0B B0 0B BB B3 00 77 FF 00'
|
||||
'0B BB B0 0B B0 0B BB B3 00 77 FF 00 00 B0 00 00'
|
||||
'00 00 0B 30 00 77 FF 00 00 0B BB BB BB BB B3 00'
|
||||
'00 77 FF 00 00 00 BB BB BB BB 30 00 00 77 FF 00'
|
||||
'70 00 0B BB BB B3 00 00 00 77 FF 00 07 00 00 00'
|
||||
'00 00 00 00 00 77 FF 00 00 00 00 00 00 00 00 00'
|
||||
'00 77 FF 00 00 00 00 00 00 00 00 00 00 77 FF FF'
|
||||
'FF FF FF FF FF FF FF FF FF F7 FF FF FF FF FF FF'
|
||||
'FF FF FF FF FF FF 7F FF FF FF FF FF FF FF FF FF'
|
||||
'FF FF 77 00 00 00 00 00 00 00 00 00 00 FF 77 00'
|
||||
'00 00 00 00 00 00 00 00 00 FF 77 00 00 00 00 00'
|
||||
'00 00 00 80 00 FF 77 00 00 00 00 00 00 00 00 08'
|
||||
'00 FF 77 00 00 00 0B BB BB B0 00 00 00 FF 77 00'
|
||||
'00 00 BB BB BB BB 00 00 00 FF 77 00 00 03 30 00'
|
||||
'00 0B B0 00 00 FF 77 00 00 33 03 BB BB B0 BB 00'
|
||||
'00 FF 77 00 03 30 33 3B BB BB 0B B0 00 FF 77 00'
|
||||
'03 33 33 33 BB BB BB B0 00 FF 77 00 03 33 33 33'
|
||||
'3B BB BB B0 00 FF 77 00 03 33 33 33 33 BB BB B0'
|
||||
'00 FF 77 00 03 33 30 03 30 0B BB B0 00 FF 77 00'
|
||||
'03 33 30 03 30 03 BB B0 00 FF 77 00 00 33 30 03'
|
||||
'30 03 3B 00 00 FF 77 00 00 03 33 33 33 33 30 00'
|
||||
'00 FF 77 00 00 00 33 33 33 33 00 00 00 FF 77 00'
|
||||
'00 00 03 33 33 30 00 00 00 FF 77 00 00 00 00 00'
|
||||
'00 00 00 00 00 FF 77 00 00 00 00 00 00 00 00 00'
|
||||
'00 FF 77 00 00 00 00 00 00 00 00 00 00 FF 77 77'
|
||||
'77 77 77 77 77 77 77 77 77 7F 77 77 77 77 77 77'
|
||||
'77 77 77 77 77 77'
|
||||
}
|
||||
|
||||
LEDS BITMAP MOVEABLE
|
||||
{
|
||||
'42 4D 16 09 00 00 00 00 00 00 76 00 00 00 28 00'
|
||||
'00 00 0D 00 00 00 14 01 00 00 01 00 04 00 00 00'
|
||||
'00 00 A0 08 00 00 C4 0E 00 00 C4 0E 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80'
|
||||
'00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80'
|
||||
'00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
|
||||
'00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
|
||||
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 22'
|
||||
'22 22 22 20 00 00 00 02 22 22 22 00 00 00 02 00'
|
||||
'00 00 00 02 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 00 00 00 00 02 00 00 00 00'
|
||||
'00 00 00 00 00 00 02 00 00 00 00 02 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 00'
|
||||
'00 00 00 02 00 00 00 02 22 22 22 00 00 00 00 22'
|
||||
'22 22 22 20 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 22 22 22 22 20 00 00 00 02'
|
||||
'22 22 22 00 00 00 02 00 00 00 00 02 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 00'
|
||||
'AA AA A0 02 00 00 00 0A AA AA AA 00 00 00 02 00'
|
||||
'AA AA A0 02 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 20 00 00 00 22 00 00 02 20'
|
||||
'00 00 00 22 00 00 02 00 00 00 00 02 00 00 00 02'
|
||||
'22 22 22 00 00 00 00 22 22 22 22 20 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 AA'
|
||||
'AA AA AA A0 00 00 00 0A AA AA AA 00 00 00 02 00'
|
||||
'00 00 00 0A 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 00 AA AA A0 0A 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 0A 00 AA AA A0 0A 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A 00'
|
||||
'00 00 00 0A 00 00 00 0A AA AA AA 00 00 00 00 AA'
|
||||
'AA AA AA A0 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 AA AA AA AA A0 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 0A 00 00 00 00 0A 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A 00'
|
||||
'AA AA A0 0A 00 00 00 0A AA AA AA 00 00 00 0A 00'
|
||||
'AA AA A0 0A 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A 00 00 00 00 0A 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 00 AA AA AA AA A0 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22'
|
||||
'22 22 22 20 00 00 00 02 22 22 22 00 00 00 02 00'
|
||||
'00 00 00 0A 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 00 22 22 20 0A 00 00 00 02'
|
||||
'22 22 22 00 00 00 02 00 22 22 20 0A 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 00'
|
||||
'00 00 00 0A 00 00 00 0A AA AA AA 00 00 00 00 AA'
|
||||
'AA AA AA A0 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 AA AA AA AA A0 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 0A 00 00 00 00 0A 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A 00'
|
||||
'AA AA A0 0A 00 00 00 0A AA AA AA 00 00 00 0A 00'
|
||||
'AA AA A0 02 00 00 0A A0 00 00 00 22 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A A0 00 00 00 22 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A A0 00 00 00 22 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A 00 00 00 00 02 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 00 AA AA AA AA A0 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 AA'
|
||||
'AA AA AA A0 00 00 00 0A AA AA AA 00 00 00 02 00'
|
||||
'00 00 00 0A 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 00 AA AA A0 0A 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 0A 00 AA AA A0 02 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A A0 00 00 00 22 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A A0 00 00 00 22 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A A0 00 00 00 22 00 00 0A 00'
|
||||
'00 00 00 02 00 00 00 0A AA AA AA 00 00 00 00 AA'
|
||||
'AA AA AA A0 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 22 22 22 22 20 00 00 00 02'
|
||||
'22 22 22 00 00 00 02 00 00 00 00 0A 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 00'
|
||||
'AA AA A0 0A 00 00 00 0A AA AA AA 00 00 00 0A 00'
|
||||
'AA AA A0 0A 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A 00 00 00 00 0A 00 00 00 02'
|
||||
'22 22 22 00 00 00 00 22 22 22 22 20 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 AA'
|
||||
'AA AA AA A0 00 00 00 0A AA AA AA 00 00 00 02 00'
|
||||
'00 00 00 0A 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 00 AA AA A0 0A 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 02 00 AA AA A0 0A 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 00'
|
||||
'00 00 00 0A 00 00 00 0A AA AA AA 00 00 00 00 AA'
|
||||
'AA AA AA A0 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 AA AA AA AA A0 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 0A 00 00 00 00 02 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A A0 00 00 00 22 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A A0 00 00 00 22 00 00 0A A0'
|
||||
'00 00 00 22 00 00 0A A0 00 00 00 22 00 00 0A 00'
|
||||
'AA AA A0 02 00 00 00 0A AA AA AA 00 00 00 02 00'
|
||||
'AA AA A0 0A 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 00 00 00 00 0A 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 00 AA AA AA AA A0 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22'
|
||||
'22 22 22 20 00 00 00 02 22 22 22 00 00 00 02 00'
|
||||
'00 00 00 0A 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 00 22 22 20 0A 00 00 00 02'
|
||||
'22 22 22 00 00 00 02 00 22 22 20 0A 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 20'
|
||||
'00 00 00 AA 00 00 02 20 00 00 00 AA 00 00 02 00'
|
||||
'00 00 00 0A 00 00 00 02 22 22 22 00 00 00 00 22'
|
||||
'22 22 22 20 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 AA AA AA AA A0 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 0A 00 00 00 00 0A 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A 00'
|
||||
'22 22 20 0A 00 00 00 02 22 22 22 00 00 00 0A 00'
|
||||
'22 22 20 0A 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A A0 00 00 00 AA 00 00 0A A0'
|
||||
'00 00 00 AA 00 00 0A 00 00 00 00 0A 00 00 00 0A'
|
||||
'AA AA AA 00 00 00 00 AA AA AA AA A0 00 00 00 00'
|
||||
'00 00 00 00 00 00'
|
||||
}
|
||||
|
||||
MINES BITMAP MOVEABLE
|
||||
{
|
||||
'42 4D 76 08 00 00 00 00 00 00 76 00 00 00 28 00'
|
||||
'00 00 10 00 00 00 00 01 00 00 01 00 04 00 00 00'
|
||||
'00 00 00 08 00 00 CE 0E 00 00 D8 0E 00 00 00 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80'
|
||||
'00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80'
|
||||
'00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
|
||||
'00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
|
||||
'00 00 FF FF FF 00 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 E0 00 00 00 00'
|
||||
'E0 00 00 00 00 07 00 00 00 00 00 E0 00 00 00 00'
|
||||
'E0 00 00 EE E0 07 00 00 EE E0 00 00 E0 00 00 00'
|
||||
'00 E0 00 00 E0 07 00 00 00 E0 0E 00 E0 00 00 0E'
|
||||
'00 E0 0E 00 E0 07 00 0E 00 E0 0E EE E0 00 00 0E'
|
||||
'EE E0 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 22 22 22 22 22 22 22 22 22 22'
|
||||
'22 22 22 22 22 22 22 22 22 00 02 22 22 22 22 22'
|
||||
'22 20 22 22 22 22 22 22 22 20 22 22 22 22 22 22'
|
||||
'08 80 88 02 22 22 22 22 80 00 00 82 22 22 22 02'
|
||||
'80 00 00 82 02 22 20 00 00 00 00 00 00 22 22 02'
|
||||
'80 00 00 82 02 22 22 22 80 00 00 82 22 22 22 22'
|
||||
'08 80 88 02 22 22 22 22 22 20 22 22 22 22 22 22'
|
||||
'22 20 22 22 22 22 22 22 22 00 02 22 22 22 22 22'
|
||||
'22 22 22 22 22 22 70 70 70 70 70 70 70 70 22 22'
|
||||
'22 22 22 22 22 27 29 92 22 00 02 22 99 20 22 99'
|
||||
'22 20 22 29 92 27 22 29 92 20 22 99 22 20 22 22'
|
||||
'99 80 89 92 22 27 22 22 89 90 99 82 22 20 22 02'
|
||||
'80 99 90 82 02 27 20 00 00 99 90 00 00 20 22 02'
|
||||
'89 90 99 82 02 27 22 22 99 00 09 92 22 20 22 29'
|
||||
'98 80 88 99 22 27 22 99 22 20 22 29 92 20 29 92'
|
||||
'22 20 22 22 99 27 22 22 22 00 02 22 22 20 22 22'
|
||||
'22 22 22 22 22 27 70 70 70 70 70 70 70 70 99 99'
|
||||
'99 99 99 99 99 97 99 99 99 00 09 99 99 90 99 99'
|
||||
'99 90 99 99 99 97 99 99 99 90 99 99 99 90 99 99'
|
||||
'08 80 88 09 99 97 99 99 80 00 00 89 99 90 99 09'
|
||||
'80 00 00 89 09 97 90 00 00 00 00 00 00 90 99 09'
|
||||
'80 00 00 89 09 97 99 99 80 00 00 89 99 90 99 99'
|
||||
'08 80 88 09 99 97 99 99 99 90 99 99 99 90 99 99'
|
||||
'99 90 99 99 99 97 99 99 99 00 09 99 99 90 99 99'
|
||||
'99 99 99 99 99 97 00 00 00 00 00 00 00 00 A2 22'
|
||||
'22 22 22 22 22 20 A2 22 22 22 22 22 22 20 A2 22'
|
||||
'22 22 22 E2 22 20 A2 22 E2 22 22 22 22 20 A2 22'
|
||||
'22 22 22 E2 22 20 A2 22 E2 22 22 EE E2 20 A2 22'
|
||||
'EE E2 22 22 E2 20 A2 22 22 E2 22 22 E2 20 A2 22'
|
||||
'22 E2 2E 22 E2 20 A2 2E 22 E2 2E 22 E2 20 A2 2E'
|
||||
'22 E2 2E EE E2 20 A2 2E EE E2 22 22 22 20 A2 22'
|
||||
'22 22 22 22 22 20 A2 22 22 22 22 22 22 20 AA AA'
|
||||
'AA AA AA AA AA AA 00 00 00 00 00 00 00 00 A4 44'
|
||||
'44 44 44 44 44 40 A2 22 22 22 22 22 22 40 A2 20'
|
||||
'00 00 00 07 22 40 A2 22 00 00 02 27 22 40 A2 22'
|
||||
'22 00 02 27 22 40 A2 22 22 22 22 27 22 40 A2 22'
|
||||
'22 22 22 27 22 40 A2 29 99 99 99 90 22 40 A2 29'
|
||||
'99 99 99 90 22 40 A2 29 99 99 99 90 22 40 A2 29'
|
||||
'99 99 99 90 22 40 A2 29 99 99 99 90 22 40 A2 22'
|
||||
'22 22 22 22 22 40 A2 22 22 22 22 22 22 40 AA AA'
|
||||
'AA AA AA AA AA A0 00 00 00 00 00 00 00 00 A4 44'
|
||||
'44 44 44 44 44 40 A2 22 22 22 22 22 22 40 A2 22'
|
||||
'22 22 22 22 22 40 A2 22 22 22 22 22 22 40 A2 22'
|
||||
'22 22 22 22 22 40 A2 22 22 22 22 22 22 40 A2 22'
|
||||
'22 22 22 22 22 40 A2 22 22 22 22 22 22 40 A2 22'
|
||||
'22 22 22 22 22 40 A2 22 22 22 22 22 22 40 A2 22'
|
||||
'22 22 22 22 22 40 A2 22 22 22 22 22 22 40 A2 22'
|
||||
'22 22 22 22 22 40 A2 22 22 22 22 22 22 40 AA AA'
|
||||
'AA AA AA AA AA A0 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 77 77 77 70 00 00 00 00'
|
||||
'70 00 00 70 00 07 00 00 70 00 00 70 00 00 00 00'
|
||||
'70 00 00 70 00 07 00 00 07 77 77 00 00 00 00 00'
|
||||
'70 00 00 70 00 07 00 00 70 00 00 70 00 00 00 00'
|
||||
'70 00 00 70 00 07 00 00 77 77 77 70 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 90 00 00 00 00 00 00'
|
||||
'00 90 00 00 00 07 00 00 00 90 00 00 00 00 00 00'
|
||||
'00 90 00 00 00 07 00 00 00 09 00 00 00 00 00 00'
|
||||
'00 00 90 00 00 07 00 00 00 00 09 00 00 00 00 00'
|
||||
'00 00 00 90 00 07 00 00 99 99 99 90 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 DD DD DD D0 00 00 00 00'
|
||||
'D0 00 00 D0 00 07 00 00 D0 00 00 D0 00 00 00 00'
|
||||
'D0 00 00 D0 00 07 00 00 DD DD DD D0 00 00 00 00'
|
||||
'D0 00 00 00 00 07 00 00 D0 00 00 00 00 00 00 00'
|
||||
'D0 00 00 00 00 07 00 00 DD DD DD D0 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 CC CC CC C0 00 00 00 00'
|
||||
'00 00 00 C0 00 07 00 00 00 00 00 C0 00 00 00 00'
|
||||
'00 00 00 C0 00 07 00 00 CC CC CC C0 00 00 00 00'
|
||||
'C0 00 00 00 00 07 00 00 C0 00 00 00 00 00 00 00'
|
||||
'C0 00 00 00 00 07 00 00 CC CC CC C0 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 B0 00 00 00 00'
|
||||
'00 00 00 B0 00 07 00 00 00 00 00 B0 00 00 00 00'
|
||||
'00 00 00 B0 00 07 00 00 BB BB BB B0 00 00 00 00'
|
||||
'B0 00 00 B0 00 07 00 00 B0 00 00 B0 00 00 00 00'
|
||||
'B0 00 00 B0 00 07 00 00 B0 00 00 B0 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 EE EE EE E0 00 00 00 00'
|
||||
'00 00 00 E0 00 07 00 00 00 00 00 E0 00 00 00 00'
|
||||
'00 00 00 E0 00 07 00 00 EE EE EE E0 00 00 00 00'
|
||||
'00 00 00 E0 00 07 00 00 00 00 00 E0 00 00 00 00'
|
||||
'00 00 00 E0 00 07 00 00 EE EE EE E0 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 FF FF FF F0 00 00 00 00'
|
||||
'F0 00 00 00 00 07 00 00 F0 00 00 00 00 00 00 00'
|
||||
'F0 00 00 00 00 07 00 00 FF FF FF F0 00 00 00 00'
|
||||
'00 00 00 F0 00 07 00 00 00 00 00 F0 00 00 00 00'
|
||||
'00 00 00 F0 00 07 00 00 FF FF FF F0 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 70 70 70 70 70 70 70 70 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 AA AA AA 00 00 00 00 00'
|
||||
'00 0A 00 00 00 07 00 00 00 0A 00 00 00 00 00 00'
|
||||
'00 0A 00 00 00 07 00 00 00 0A 00 00 00 00 00 00'
|
||||
'00 0A 00 00 00 07 00 00 00 0A 00 00 00 00 00 00'
|
||||
'00 0A 00 00 00 07 00 00 0A AA 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 07 FF FF FF FF FF FF FF FF 00 00'
|
||||
'00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
|
||||
'00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
|
||||
'00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
|
||||
'00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
|
||||
'00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
|
||||
'00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
|
||||
'00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
|
||||
'00 00 00 00 00 0F'
|
||||
}
|
||||
|
||||
/* English-US Resources */
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
STRINGTABLE {
|
||||
IDS_APPNAME, "WineMine"
|
||||
|
||||
}
|
||||
|
||||
MENU_WINEMINE MENU DISCARDABLE
|
||||
{
|
||||
POPUP "&Options" {
|
||||
MENUITEM "&New", IDM_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Mark Question", IDM_MARKQ
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Beginner", IDM_BEGINNER
|
||||
MENUITEM "&Advanced", IDM_ADVANCED
|
||||
MENUITEM "&Expert", IDM_EXPERT
|
||||
MENUITEM "&Custom", IDM_CUSTOM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&xit", IDM_EXIT
|
||||
}
|
||||
POPUP "&Info" {
|
||||
MENUITEM "&Fastest Times", IDM_TIMES
|
||||
MENUITEM "&About", IDM_ABOUT
|
||||
}
|
||||
}
|
||||
|
||||
DLG_TIMES DIALOG DISCARDABLE 0, 0, 160, 80
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK |
|
||||
WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP
|
||||
CAPTION "Fastest Times"
|
||||
{
|
||||
GROUPBOX "Fastest Times", IDIGNORE, 10, 10, 140, 45
|
||||
LTEXT "Beginner", IDIGNORE, 20, 20, 40, 8
|
||||
LTEXT "Advanced", IDIGNORE, 20, 30, 40, 8
|
||||
LTEXT "Expert", IDIGNORE, 20, 40, 40, 8
|
||||
LTEXT "999", IDC_TIME1, 70, 20, 15, 8
|
||||
LTEXT "999", IDC_TIME2, 70, 30, 15, 8
|
||||
LTEXT "999", IDC_TIME3, 70, 40, 15, 8
|
||||
LTEXT "", IDC_NAME1, 90, 20, 55, 8
|
||||
LTEXT "", IDC_NAME2, 90, 30, 55, 8
|
||||
LTEXT "", IDC_NAME3, 90, 40, 55, 8
|
||||
DEFPUSHBUTTON "OK", IDOK, 55, 60, 50, 15
|
||||
}
|
||||
|
||||
DLG_CONGRATS DIALOG DISCARDABLE 0, 0, 160, 60
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK |
|
||||
WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP
|
||||
CAPTION "Congratulations!"
|
||||
{
|
||||
LTEXT "Please enter your name", IDIGNORE, 10, 10, 150, 10
|
||||
EDITTEXT IDC_EDITNAME, 25, 20, 110, 12
|
||||
DEFPUSHBUTTON "Ok", IDOK, 60, 40, 40, 15
|
||||
}
|
||||
|
||||
DLG_CUSTOM DIALOG DISCARDABLE 0, 0, 100, 100
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK |
|
||||
WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP
|
||||
CAPTION "Custom Game"
|
||||
{
|
||||
LTEXT "Rows", IDIGNORE, 5, 5, 30, 10
|
||||
LTEXT "Cols", IDIGNORE, 5, 35, 30, 10
|
||||
LTEXT "Mines", IDIGNORE, 5, 65, 30, 10
|
||||
EDITTEXT IDC_EDITROWS, 5, 15, 20, 12, ES_NUMBER
|
||||
EDITTEXT IDC_EDITCOLS, 5, 45, 20, 12, ES_NUMBER
|
||||
EDITTEXT IDC_EDITMINES, 5, 75, 20, 12, ES_NUMBER
|
||||
DEFPUSHBUTTON "Ok", IDOK, 40, 30, 50, 15
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 40, 50, 50, 15
|
||||
}
|
||||
|
||||
DLG_ABOUT DIALOG DISCARDABLE 0, 0, 145, 80
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK |
|
||||
WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP
|
||||
CAPTION "About"
|
||||
{
|
||||
LTEXT "Winemine", IDIGNORE, 10, 10, 35, 10
|
||||
LTEXT "Copyright 2000, Joshua Thielen", IDIGNORE, 35, 25, 100, 10
|
||||
LTEXT "under the Wine license", IDIGNORE, 35, 35, 100, 10
|
||||
ICON "WINEMINE", IDIGNORE, 10, 25, 20, 20
|
||||
DEFPUSHBUTTON "Ok", IDOK, 50, 60, 55, 15
|
||||
}
|
||||
|
||||
/* End of English-US Resources */
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
name winemine
|
||||
mode guiexe
|
||||
type win32
|
||||
init WinMain
|
||||
rsrc winemine
|
Loading…
Reference in New Issue