61#define APPNAME _T("Maze")
78#define MAX_MAZE_SIZE_X ((unsigned long) 1000)
79#define MAX_MAZE_SIZE_Y ((unsigned long) 1000)
81#define MOVE_LIST_SIZE (MAX_MAZE_SIZE_X * MAX_MAZE_SIZE_Y)
83#define WALL_TOP 0x8000
84#define WALL_RIGHT 0x4000
85#define WALL_BOTTOM 0x2000
86#define WALL_LEFT 0x1000
88#define DOOR_IN_TOP 0x800
89#define DOOR_IN_RIGHT 0x400
90#define DOOR_IN_BOTTOM 0x200
91#define DOOR_IN_LEFT 0x100
92#define DOOR_IN_ANY 0xF00
94#define DOOR_OUT_TOP 0x80
95#define DOOR_OUT_RIGHT 0x40
96#define DOOR_OUT_BOTTOM 0x20
97#define DOOR_OUT_LEFT 0x10
99#define START_SQUARE 0x2
100#define END_SQUARE 0x1
105#define get_random(x) (rand() % (x))
136 DWORD valuetype, valuesize, val_size, val_presd, val_postsd, val_sd;
144 valuesize =
sizeof(
DWORD);
193 register int i,
j, wall;
253 wall = (wall + 2) % 4;
282 register int i, newdoor = 0;
327 register int num_candidates;
344 candidates[num_candidates++] = 0;
360 candidates[num_candidates++] = 1;
376 candidates[num_candidates++] = 2;
392 candidates[num_candidates++] = 3;
395 if (num_candidates == 0)
397 if (num_candidates == 1)
398 return candidates[0];
399 return candidates[
get_random(num_candidates)];
414register int i,
j,
dir;
483register int i,
j,
dir;
548 }
while (!action_done);
556 path[
n + 1].dir = -1;
593 static long grayPattern [] = {
static unsigned short maze[MAX_MAZE_SIZE_X][MAX_MAZE_SIZE_Y]
static void start_timer(HWND hWnd, int iTimeout)
static void set_maze_sizes(int width, int height)
static void SetDefaults()
static struct @1561 save_path[MOVE_LIST_SIZE]
static void enter_square(int, HDC, HBRUSH)
INT_PTR CALLBACK AboutProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
static BOOL OnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct)
static void ReadSettings(HWND hWnd)
static void ReadRegistry()
static void WriteRegistry()
static int post_solve_delay
static void initialize_maze()
static LPCWSTR registryPath
static struct @1561 move_list[MOVE_LIST_SIZE]
LRESULT CALLBACK ScreenSaverProc(HWND hWnd, UINT message, WPARAM uParam, LPARAM lParam)
static void draw_maze_border(HWND hWnd)
static int pre_solve_delay
static void draw_solid_square(int, int, int, HDC, HBRUSH)
BOOL WINAPI RegisterDialogClasses(HANDLE hmodule)
BOOL WINAPI ScreenSaverConfigureDialog(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
#define RegCloseKey(hKey)
static void create_maze()
static void begin_solve_maze()
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
void __cdecl srand(_In_ unsigned int _Seed)
_Check_return_ int __cdecl rand(void)
#define memcpy(s1, s2, n)
#define IDC_SLIDER_POSTSD
#define REG_OPTION_NON_VOLATILE
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
LRESULT WINAPI DefScreenSaverProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
BITMAPINFOHEADER bmiHeader
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
#define HKEY_CURRENT_USER
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
HDC WINAPI GetDC(_In_opt_ HWND)
#define SendDlgItemMessage
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)