57 #if !defined (APIENTRY) 58 #define APIENTRY far pascal 62 #define DLGPROC FARPROC 83 #define MAX_MAZE_SIZE_X ((unsigned long) 250) 84 #define MAX_MAZE_SIZE_Y ((unsigned long) 250) 86 #define MOVE_LIST_SIZE (MAX_MAZE_SIZE_X * MAX_MAZE_SIZE_Y) 88 #define WALL_TOP 0x8000 89 #define WALL_RIGHT 0x4000 90 #define WALL_BOTTOM 0x2000 91 #define WALL_LEFT 0x1000 93 #define DOOR_IN_TOP 0x800 94 #define DOOR_IN_RIGHT 0x400 95 #define DOOR_IN_BOTTOM 0x200 96 #define DOOR_IN_LEFT 0x100 97 #define DOOR_IN_ANY 0xF00 99 #define DOOR_OUT_TOP 0x80 100 #define DOOR_OUT_RIGHT 0x40 101 #define DOOR_OUT_BOTTOM 0x20 102 #define DOOR_OUT_LEFT 0x10 104 #define START_SQUARE 0x2 105 #define END_SQUARE 0x1 110 #define get_random(x) (rand() % (x)) 141 register int i,
j, wall;
237 register int i, newdoor = 0;
289 register int num_candidates;
306 candidates[num_candidates++] = 0;
322 candidates[num_candidates++] = 1;
338 candidates[num_candidates++] = 2;
354 candidates[num_candidates++] = 3;
357 if (num_candidates == 0)
359 if (num_candidates == 1)
360 return ( candidates[0] );
361 return ( candidates[
get_random(num_candidates) ] );
381 register int i,
j,
dir;
489 static long grayPattern[] = {
567 }
while (! action_done);
633 if (!hPrevInstance) {
HGDIOBJ WINAPI GetStockObject(_In_ int)
GLint GLint GLsizei width
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
static int pre_solve_delay
BITMAPINFOHEADER bmiHeader
static void enter_square(int, HDC, HBRUSH)
HDC WINAPI GetDC(_In_opt_ HWND)
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
void OnTimer(HWND hwnd, UINT id)
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
BOOL WINAPI WaitMessage(void)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
BOOL WINAPI UpdateWindow(_In_ HWND)
void __cdecl srand(_In_ unsigned int _Seed)
static void start_timer(HWND hWnd, int iTimeout)
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
GLint GLint GLint GLint GLint x
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
static void draw_solid_square(int, int, int, HDC, HBRUSH)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
static BOOL InitApplication(HINSTANCE hInstance)
_Check_return_ int __cdecl rand(void)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
static struct @1525 move_list[MOVE_LIST_SIZE]
static void create_maze()
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
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
static int post_solve_delay
static void set_maze_sizes(int width, int height)
static void initialize_maze()
#define memcpy(s1, s2, n)
static unsigned short maze[MAX_MAZE_SIZE_X][MAX_MAZE_SIZE_Y]
GLint GLint GLsizei GLsizei height
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
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
static struct @1525 save_path[MOVE_LIST_SIZE]
static void begin_solve_maze()
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
GLint GLint GLint GLint GLint GLint y
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM uParam, LPARAM lParam)
static BOOL OnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct)
#define WS_OVERLAPPEDWINDOW
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
UINT WINAPI GetPrivateProfileIntA(LPCSTR section, LPCSTR entry, INT def_val, LPCSTR filename)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
static BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
static void draw_maze_border(HWND hWnd, HDC hDC)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)