diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan.v12.suo" "b/ProjectCode/debug\347\211\210\346\234\254/GhostMan.v12.suo" deleted file mode 100644 index b9005f6..0000000 Binary files "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan.v12.suo" and /dev/null differ diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj" "b/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj" deleted file mode 100644 index 7bd8b31..0000000 --- "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj" +++ /dev/null @@ -1,248 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {F6814BB0-8568-4616-BE8B-561C901E285C} - GhostMan - MFCProj - - - - Application - true - v120 - Unicode - Dynamic - - - Application - false - v120 - true - Unicode - Dynamic - - - - - - - - - - - - - true - - - false - - - - Use - Level3 - Disabled - WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions) - true - - - Windows - true - - - false - true - _DEBUG;%(PreprocessorDefinitions) - - - 0x0804 - _DEBUG;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - - - false - true - NDEBUG;%(PreprocessorDefinitions) - - - 0x0804 - NDEBUG;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostManDlg.cpp" "b/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostManDlg.cpp" deleted file mode 100644 index 815e0c2..0000000 --- "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostManDlg.cpp" +++ /dev/null @@ -1,3181 +0,0 @@ - -// GhostManDlg.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "GhostManDlg.h" -#include "afxdialogex.h" -#include -#include - -using namespace std; - -#ifdef _DEBUG -#define new DEBUG_NEW -#endif - - - -int g_maze[MAXX][MAXY] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 4, 2, 4, 4, 4, 4, 2, 2, -1, 4, 4, 4, 4, - -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 4, 4, 2, 2, 4, 4, 4, 2, 2, 4, 4, -1, 4, 4, - -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 4, 4, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, - -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 4, 4, 4, -1, 4, 2, 2, 4, 2, 2, 4, 4, -1, 4, - -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, 4, 4, 4, - -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 4, -1, 4, 4, -1, 4, 4, 2, 2, 4, 4, 4, 4, 4, - -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 4, 4, 4, 4, - -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 4, 4, -1, 4, 4, -1, 4, 2, 2, 2, 4, 4, 4, 4, - -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 4, 4, 4, 4, 4, 4, 4, 2, 2, 3, 4, 4, 3, 3, - -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, -1, 4, 4, 3, 2, 2, 3, 3, 3, 3, 3, - -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 4, -1, 4, 4, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, - -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 4, 4, 4, 3, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, - -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 4, 4, 3, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, - -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 4, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, -1, 3, 3, - -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 4, 3, 3, 3, 3, 2, 2, 3, -1, 3, 3, 3, 3, 3, - -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 4, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 3, 3, 3, 1, 1, 1, 1, 3, 3, 3, -1, 3, 3, 3, - -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3 -}; - -int g_SaMaze[MAXX][MAXY] = { - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -}; - -int g_SaNewMaze[MAXX][MAXY] = { - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -}; - -int g_Squared[3][3] = { - { 1, 2, 3 }, - { 4, 5, 6 }, - { 7, 8, 0 }, -}; - -int g_Derrick[7][7] = { - { 0, 0, 1, 0, 1, 0, 0 }, - { 0, 0, 1, 0, 1, 0, 0 }, - { 3, 2, 3, 2, 3, 1, 3 }, - { 0, 0, 2, 0, 2, 0, 0 }, - { 3, 1, 3, 2, 1, 3, 2 }, - { 0, 0, 2, 0, 1, 0, 0 }, - { 0, 0, 2, 0, 3, 0, 0 }, -}; - -int g_NewDerrick[7][7] = { - { 0, 0, 1, 0, 1, 0, 0 }, - { 0, 0, 1, 0, 1, 0, 0 }, - { 3, 2, 3, 2, 3, 1, 3 }, - { 0, 0, 2, 0, 2, 0, 0 }, - { 3, 1, 2, 2, 2, 3, 1 }, - { 0, 0, 2, 0, 1, 0, 0 }, - { 0, 0, 3, 0, 3, 0, 0 }, -}; - -char ans[100]; -Point S[MAXX][MAXY]; -int g_NewMaze[MAXX][MAXY]; -int vis[MAXX][MAXY]; //ʱ -int Path_Len = 0; //· -int finded = false; //Ƿҵ· -unsigned long long Time = 0; //ʱ -int Deep = 0; //ߵ -stack > Path; //· -int Out_Path[MAXX*MAXY][2]; //þô· -int Best_Path[MAXX * MAXY][2]; //洢· -int buff[55]; -char op[] = "rdlu"; -//IDA_Path ڴ·Уŵ char ַ rdlu -char IDA_Path[2333]; -int ok; -int limit; - -stack sta; -int sx, sy, ex, ey; - -IDA_S s; -SAPoint e1, e2, p[1005], m[20]; -CPoint PResult(20,10); -const double EPS = 1e-2; -const double INF = 1e20; -double x, y; -int cnt; -/************************************************/ - -int dir_x[] = { 0, 1, 0, -1 }; //xƶ -int dir_y[] = { 1, 0, -1, 0 }; //yƶ -// (0,1) (0,-1) (1,0), (-1,0) -//ֱӦ -//ǶӦͼ涨 -/************************************************/ - -// Ӧó򡰹ڡ˵ CAboutDlg Ի - -class CAboutDlg : public CDialogEx -{ -public: - CAboutDlg(); - -// Ի - - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧ - -// ʵ -protected: - DECLARE_MESSAGE_MAP() -}; - - -void CAboutDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialogEx::DoDataExchange(pDX); -} - -BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx) -END_MESSAGE_MAP() - - -// CGhostManDlg Ի - - - -CGhostManDlg::CGhostManDlg(CWnd* pParent /*=NULL*/) - : CDialogEx(CGhostManDlg::IDD, pParent) -{ - m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); - - m_nWidth = 15; - m_nHeight = 15; - m_nStartX = 0; - m_nStartY = 0; - - m_bSetStart = FALSE; - m_bSetEnd = FALSE; - - m_bHaveAStart = FALSE; - m_bHaveAEnd = FALSE; - - m_nAvailableStartX = -1; - m_nAvailableStartY = -1; - - m_nAvailableEndX = -1; - m_nAvailableEndY = -1; - - m_bInternalShow = FALSE; - m_bByStep = FALSE; - m_bClickStep = FALSE; - m_bFirstStep = FALSE; - - m_bHaveAResult = FALSE; - m_bHaveARoad = FALSE; - m_bleftButtonDown = FALSE; - m_bNeedRepaint = FALSE; - m_bInitGhostMan = TRUE; - m_nAlgorithmIndex = 0; - m_nExeCount = 0; - - m_nOriGridBottom = 0; - m_nOriGridTop = 0; - m_nOriGridLeft = 0; - m_nOriGridRight = 0; - - m_nCurGridLeft = 0; - m_nCurGridBottom = 0; - m_nCurGridTop = 0; - m_nCurGridRight = 0; - m_nCurPandaIndex = 0; - - m_nIDAGridStartX = 0; - m_nIDAGridStartY = 0; - - m_nIDACurGridX = 0; - m_nIDACurGridY = 0; - - m_nHidedPandaIndex = 0; - m_nFlickerIndex = 0; - m_bInitSquared = FALSE; - - memcpy(g_NewMaze, g_maze, sizeof(int)*MAXX*MAXY); -} - -void CGhostManDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialogEx::DoDataExchange(pDX); - DDX_Control(pDX, IDC_STATIC_SETSTART, m_btnSetStart); - DDX_Control(pDX, IDC_STATIC_SETEND, m_btnSetEnd); - DDX_Control(pDX, IDC_STATIC_MIN, m_btnMin); - DDX_Control(pDX, IDC_STATIC_CLOSE, m_btnClose); - DDX_Control(pDX, IDC_STATIC_ASTAR, m_btnAStar); - DDX_Control(pDX, IDC_STATIC_BFS, m_btnBFS); - DDX_Control(pDX, IDC_STATIC_DFS, m_btnDFS); - DDX_Control(pDX, IDC_STATIC_IDASTAR, m_btnIDAStar); - DDX_Control(pDX, IDC_STATIC_ACO, m_btnSA); - DDX_Control(pDX, IDC_STATIC_INIT, m_btnInit); - DDX_Control(pDX, IDC_STATIC_EXEC, m_btnExec); - DDX_Control(pDX, IDC_STATIC_STEP, m_btnStep); - DDX_Control(pDX, IDC_STATIC_DYNAMIC, m_btnDynamic); - DDX_Control(pDX, IDC_STATIC_STATIC, m_btnST); - DDX_Control(pDX, IDC_STATIC_PANDA1, m_btnPanda1); - DDX_Control(pDX, IDC_STATIC_PANDA2, m_btnPanda2); - DDX_Control(pDX, IDC_STATIC_PANDA3, m_btnPanda3); - DDX_Control(pDX, IDC_STATIC_PANDA4, m_btnPanda4); - DDX_Control(pDX, IDC_STATIC_PANDA5, m_btnPanda5); - DDX_Control(pDX, IDC_STATIC_PANDA6, m_btnPanda6); - DDX_Control(pDX, IDC_STATIC_PANDA7, m_btnPanda7); - DDX_Control(pDX, IDC_STATIC_PANDA8, m_btnPanda8); - DDX_Control(pDX, IDC_STATIC_PANDA9, m_btnPanda9); -} - -BEGIN_MESSAGE_MAP(CGhostManDlg, CDialogEx) - ON_WM_SYSCOMMAND() - ON_WM_PAINT() - ON_WM_QUERYDRAGICON() - ON_WM_TIMER() - ON_WM_LBUTTONDOWN() - ON_WM_LBUTTONUP() - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOVE() - ON_WM_ERASEBKGND() - ON_COMMAND(ID_MENU_EXIT, &CGhostManDlg::OnMenuExit) - ON_STN_CLICKED(IDC_STATIC_SETSTART, &CGhostManDlg::OnStnClickedStaticSetstart) - ON_STN_CLICKED(IDC_STATIC_SETEND, &CGhostManDlg::OnStnClickedStaticSetend) - ON_STN_CLICKED(IDC_STATIC_CLOSE, &CGhostManDlg::OnStnClickedStaticClose) - ON_STN_CLICKED(IDC_STATIC_MIN, &CGhostManDlg::OnStnClickedStaticMin) - ON_STN_CLICKED(IDC_STATIC_MAX, &CGhostManDlg::OnStnClickedStaticMax) - ON_STN_CLICKED(IDC_STATIC_ASTAR, &CGhostManDlg::OnStnClickedStaticAstar) - ON_STN_CLICKED(IDC_STATIC_DYNAMIC, &CGhostManDlg::OnStnClickedStaticDynamic) - ON_STN_CLICKED(IDC_STATIC_INIT, &CGhostManDlg::OnStnClickedStaticInit) - ON_STN_CLICKED(IDC_STATIC_EXEC, &CGhostManDlg::OnStnClickedStaticExec) - ON_STN_CLICKED(IDC_STATIC_STEP, &CGhostManDlg::OnStnClickedStaticStep) - ON_STN_CLICKED(IDC_STATIC_STATIC, &CGhostManDlg::OnStnClickedStaticStatic) - ON_STN_CLICKED(IDC_STATIC_BFS, &CGhostManDlg::OnStnClickedStaticBfs) - ON_STN_CLICKED(IDC_STATIC_DFS, &CGhostManDlg::OnStnClickedStaticDfs) - ON_STN_CLICKED(IDC_STATIC_IDASTAR, &CGhostManDlg::OnStnClickedStaticIdastar) - ON_STN_CLICKED(IDC_STATIC_ACO, &CGhostManDlg::OnStnClickedStaticSA) - ON_MESSAGE(WM_REPAINT_GRID, &CGhostManDlg::OnRepaintGrid) - ON_MESSAGE(WM_PAINT_PANDA,&CGhostManDlg::OnPaintPanda) -END_MESSAGE_MAP() - - -// CGhostManDlg Ϣ - -BOOL CGhostManDlg::OnInitDialog() -{ - CDialogEx::OnInitDialog(); - - // ...˵ӵϵͳ˵С - - // IDM_ABOUTBOX ϵͳΧڡ - - CMenu* pSysMenu = GetSystemMenu(FALSE); - if (pSysMenu != NULL) - { - BOOL bNameValid; - CString strAboutMenu; - bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX); - ASSERT(bNameValid); - } - - // ô˶Իͼꡣ ӦóڲǶԻʱܽԶ - // ִд˲ - SetIcon(m_hIcon, TRUE); // ôͼ - SetIcon(m_hIcon, FALSE); // Сͼ - -// SetWindowPos(NULL, 0, 0, 100, 50, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER); - GetDlgItem(IDC_STATIC_PIC)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_STATIC_MAX)->EnableWindow(FALSE); - - for (int i = 1; i < 10; i++) - { - GetDlgItem(1033 + i)->ShowWindow(SW_HIDE); - } - - CRect rc; - GetDlgItem(IDC_STATIC_PIC)->GetWindowRect(rc); - ScreenToClient(rc);//תΪԻϵλ - m_nOriGridTop = rc.top; - m_nOriGridBottom = rc.bottom; - m_nOriGridLeft = rc.left; - m_nOriGridRight = rc.right; - - m_nCurGridTop = m_nOriGridTop; - m_nCurGridBottom = m_nOriGridBottom; - m_nCurGridLeft = m_nOriGridLeft; - m_nCurGridRight = m_nOriGridRight; - - CRect rect; - GetDlgItem(IDC_STATIC_PANDA3)->GetWindowRect(rect); - ScreenToClient(rect); - - m_nIDAGridStartX = rect.right + 69; - m_nIDAGridStartY = rect.top; - - for (int i = 1; i < 10; i++) - { - GetDlgItem(1033 + i)->GetWindowRect(m_rcPanda[i - 1]); - ScreenToClient(m_rcPanda[i - 1]); - } - - SetTimer(IDT_DELAY_DRAWGRID, 30, NULL); - // TODO: ڴӶijʼ - - return TRUE; // ǽõؼ򷵻 TRUE -} - -void CGhostManDlg::OnSysCommand(UINT nID, LPARAM lParam) -{ -} - -// ԻСťҪĴ -// Ƹͼꡣ ʹĵ/ͼģ͵ MFC Ӧó -// ⽫ɿԶɡ - -void CGhostManDlg::OnPaint() -{ - if (IsIconic()) - { - CPaintDC dc(this); // ڻƵ豸 - - SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); - - // ʹͼڹо - int cxIcon = GetSystemMetrics(SM_CXICON); - int cyIcon = GetSystemMetrics(SM_CYICON); - CRect rect; - GetClientRect(&rect); - int x = (rect.Width() - cxIcon + 1) / 2; - int y = (rect.Height() - cyIcon + 1) / 2; - - // ͼ - dc.DrawIcon(x, y, m_hIcon); - } - else - { - if (m_nAlgorithmIndex <= 3) - { - DrawGrid(); - DrawCurMazeColor(); - } - else - { - // DrawInitDerrick(); - } - CDialogEx::OnPaint(); - } -} - -//û϶Сʱϵͳô˺ȡù -//ʾ -HCURSOR CGhostManDlg::OnQueryDragIcon() -{ - return static_cast(m_hIcon); -} - - -void CGhostManDlg::OnMenuExit() -{ - // TODO: ڴ - SendMessage(WM_CLOSE); -} - -void CGhostManDlg::DrawGrid() -{ - CClientDC dc(this); //ʹԸɫ - //ߵɫɫ -// color = m_btTableLineColor.Color;//Ѿڳʼ渳ֵ - - //ߵķ -// int iDrawType = 0; -// iDrawType = atoi(szLineTypeDraw); - - //ߵĻ"""ɫ""ϸ" - CPen pen(PS_SOLID, 1, RGB(255,255,255)); // - CPen* pOldPen = dc.SelectObject(&pen);//ʺͻ - - CRect rect; - //佲ÿؼĻеλ - CWnd* pWnd = GetDlgItem(IDC_STATIC_PIC); - if (pWnd == NULL) - return; - pWnd->GetWindowRect(&rect); //ȡؼĻλ,ؼ - ScreenToClient(rect);//תΪԻϵλ - - CRect rc; - GetWindowRect(rc); - if (m_bInitGhostMan) - { - rect.bottom += 2; - rect.right -= 5; - GetDlgItem(IDC_STATIC_PIC)->MoveWindow(rect); - - m_bInitGhostMan = FALSE; - } - else - { - - } - - - m_nStartX = rect.left; - m_nStartY = rect.top; - - //ʼ - //TOP - - dc.MoveTo(rect.left, rect.top); // [0,0] - dc.LineTo(rect.right, rect.top); - - //LEFT - dc.MoveTo(rect.left, rect.top);//0ʼΪʼ - dc.LineTo(rect.left, rect.bottom); - - int xValue = 1; - int iCount = 20; - //м6 - for (int i = 1; i <= iCount; i++) - { - dc.MoveTo(rect.left, rect.top + xValue + m_nHeight*i); // [0,0] - dc.LineTo(rect.right, rect.top + xValue + m_nHeight*i); - xValue = i + 1; - } - - xValue = 1; - iCount = 40; - for (int i = 1; i <= iCount; i++) - { - dc.MoveTo(rect.left + xValue + m_nWidth*i, rect.top); // [0,0] - dc.LineTo(rect.left + xValue + m_nWidth*i, rect.bottom); - xValue = i + 1; - } - //ˢ - dc.SelectObject(pOldPen); //[ԲҪ] - UpdateData(FALSE); - -} - -void CGhostManDlg::InitBFStatus() -{ - memset(S, 0, sizeof(S)); - memset(vis, 0, sizeof(vis)); -} -void CGhostManDlg::InitDFStatus() -{ - finded = false; - while (!sta.empty()){ - sta.pop(); - } - memset(vis, 0, sizeof(vis)); -} - -void CGhostManDlg::InitAstartatus() -{ - memset(S, 0, sizeof(S)); - memset(vis, 0, sizeof(vis)); -} -void CGhostManDlg::InitIDAstarstatus() -{ - memset(s.maze, 0, sizeof(s.maze)); - ok = 0; limit = 1; - for (int i = 0; i < 3; ++i){ - for (int j = 0; j < 3; ++j){ - s.maze[i][j] = g_Squared[i][j]; - if (!g_Squared[i][j]){ - s.x = i; - s.y = j; - } - } - } -} - -void CGhostManDlg::InitStatus() //ʼǰеյ -{ - m_bSetStart = FALSE; - m_bSetEnd = FALSE; - m_bInternalShow = FALSE; - m_bByStep = FALSE; - m_bClickStep = FALSE; - m_bFirstStep = FALSE; - m_bHaveARoad = FALSE; -} - -void CGhostManDlg::OnLButtonDown(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - if (point.x < 775 && point.y <100) - { - this->m_bleftButtonDown = TRUE; - this->m_mousePoint = CPoint(point); - } - int x = (point.x - m_nStartX) / (m_nWidth + 1); - int y = (point.y - m_nStartY) / (m_nHeight + 1); - - if (x >= MAXY || x < 0 || y >= MAXX || y < 0) - { - return; - } - CClientDC dc(this); - - if (m_nAlgorithmIndex == 4) - { - } - else if (m_nAlgorithmIndex <= 3) - { - CRect rect; - GetDlgItem(IDC_STATIC_PIC)->GetWindowRect(&rect); //screenϵ - ScreenToClient(&rect); - - if (m_bSetEnd) - { - if (g_NewMaze[y][x] == -1) - { - MessageBox(L"Don't Choose A obstacle", L"Error"); - return; - } - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(191, 63, 170)); - m_bSetEnd = FALSE; - m_bHaveAEnd = TRUE; - - m_nAvailableEndX = x; - m_nAvailableEndY = y; - ex = y, ey = x; - - m_btnSetEnd.m_nClicked = 0; - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETEND_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETEND_NORMAL)); - m_btnSetEnd.SetBitmap(hBmp); - return; - } - else if (m_bSetStart) - { - if (g_NewMaze[y][x] == -1) - { - MessageBox(L"Don't Choose A obstacle", L"Error"); - return; - } - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(191, 63, 63)); - m_bSetStart = FALSE; - m_bHaveAStart = TRUE; - m_nAvailableStartX = x; - m_nAvailableStartY = y; - - sx = y, sy = x; - - m_btnSetStart.m_nClicked = 0; - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETSTART_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETSTART_NORMAL)); - m_btnSetStart.SetBitmap(hBmp); - - return; - } - - if ((m_nAvailableStartX == x && m_nAvailableStartY == y) || (m_nAvailableEndX == x && m_nAvailableEndY == y)) - { - MessageBox(L"Don't Touch me", L"Error"); - return; - } - switch (g_NewMaze[y][x]) - { - case -1: - g_NewMaze[y][x] = 1; - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(244, 241, 241)); - break; - case 1: - g_NewMaze[y][x] = 4; - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(191, 225, 184)); - break; - case 4: - g_NewMaze[y][x] = 3; - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(230, 230, 179)); - break; - case 3: - g_NewMaze[y][x] = 2; - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(140, 191, 217)); - break; - case 2: - g_NewMaze[y][x] = -1; - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(139, 174, 133)); - break; - } - - if (m_bHaveARoad) - { - DrawCurMazeColor(); - DrawGrid(); - OnStnClickedStaticExec(); - } - } - else if (m_nAlgorithmIndex == 5) - { - switch (g_SaNewMaze[y][x]) - { - case 1: - g_SaNewMaze[y][x] = 2; - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, - m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(255, 0, 0)); - break; - case 2: - g_SaNewMaze[y][x] = 1; - dc.FillSolidRect(m_nStartX + x*(m_nWidth + 1) + 1, - m_nStartY + y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(205, 191, 179)); - break; - } - - if (m_bHaveAResult) - { - Final_SA(); - SetTimer(IDT_DELAY_FLICKER, 100, NULL); - } - - } - - - CDialogEx::OnLButtonDown(nFlags, point); -} - -void CGhostManDlg::OnLButtonUp(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - this->m_bleftButtonDown = FALSE; - if (m_nAlgorithmIndex <= 3) - { - DrawGrid(); - DrawCurMazeColor(); - } - else if (m_nAlgorithmIndex == 5) - { - DrawNewSAMaze(); - } - - CDialogEx::OnLButtonUp(nFlags, point); -} - - -void CGhostManDlg::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - if (this->m_bleftButtonDown) - { - /// ʱ϶ - CPoint pointChanged = point - (this->m_mousePoint); - CRect rect; - this->GetWindowRect(&rect); - this->SetWindowPos(NULL, rect.left + pointChanged.x, rect.top + pointChanged.y, - rect.Width(), rect.Height(), 0); - } - CDialogEx::OnMouseMove(nFlags, point); -} - -void CGhostManDlg::OnMouseLeave() -{ - // TODO: ڴϢ/Ĭֵ - this->m_bleftButtonDown = FALSE; - CDialogEx::OnMouseLeave(); -} - -void CGhostManDlg::DrawAColor(int nx, int ny,COLORREF color) -{ - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + nx*(m_nWidth + 1) + 1, m_nStartY + ny*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, color); -} - -void CGhostManDlg::DrawInitMazeColor() -{ - - for (int i = 0; i < MAXY; i++) - { - for (int j = 0; j < MAXX; j++) - { - switch (g_maze[j][i]) - { - case 1: - DrawAColor(i, j, RGB(244, 241, 241)); - break; - case -1: - DrawAColor(i, j, RGB(139, 174, 133)); - break; - case 2: - DrawAColor(i, j, RGB(140, 191, 217)); - break; - case 3: - DrawAColor(i, j, RGB(230, 230, 179)); - break; - case 4: - DrawAColor(i, j, RGB(191, 225, 184)); - break; - } - } - } - CClientDC dc(this); - if (m_bHaveAStart) - { - dc.FillSolidRect(m_nStartX + m_nAvailableStartX*(m_nWidth + 1) + 1, m_nStartY + m_nAvailableStartY*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(191, 63, 63)); - m_bSetStart = FALSE; - m_bHaveAStart = TRUE; - } - if (m_bHaveAEnd) - { - dc.FillSolidRect(m_nStartX + m_nAvailableEndX*(m_nWidth + 1) + 1, m_nStartY + m_nAvailableEndY*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(191, 63, 170)); - m_bSetEnd = FALSE; - m_bHaveAEnd = TRUE; - } -} -void CGhostManDlg::DrawInitSAMaze() -{ - for (int i = 0; i < MAXY; i++) - { - for (int j = 0; j < MAXX; j++) - { - switch (g_SaMaze[j][i]) - { - case 1: - DrawAColor(i, j, RGB(205, 191, 179)); - break; - case 2: - DrawAColor(i, j, RGB(255, 0, 0)); - break; - } - } - } -} - -void CGhostManDlg::DrawNewSAMaze() -{ - for (int i = 0; i < MAXY; i++) - { - for (int j = 0; j < MAXX; j++) - { - switch (g_SaNewMaze[j][i]) - { - case 1: - DrawAColor(i, j, RGB(205, 191, 179)); - break; - case 2: - DrawAColor(i, j, RGB(255, 0, 0)); - break; - } - } - } -} - - - -void CGhostManDlg::DrawCurMazeColor() -{ - for (int i = 0; i < MAXY; i++) - { - for (int j = 0; j < MAXX; j++) - { - switch (g_NewMaze[j][i]) - { - case 1: - DrawAColor(i, j, RGB(244, 241, 241)); - break; - case -1: - DrawAColor(i, j, RGB(139, 174, 133)); - break; - case 2: - DrawAColor(i, j, RGB(140, 191, 217)); - break; - case 3: - DrawAColor(i, j, RGB(230, 230, 179)); - break; - case 4: - DrawAColor(i, j, RGB(191, 225, 184)); - break; - } - } - } - CClientDC dc(this); - if (m_bHaveAStart) - { - dc.FillSolidRect(m_nStartX + m_nAvailableStartX*(m_nWidth + 1) + 1, m_nStartY + m_nAvailableStartY*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(191, 63, 63)); - m_bSetStart = FALSE; - m_bHaveAStart = TRUE; - } - if (m_bHaveAEnd) - { - dc.FillSolidRect(m_nStartX + m_nAvailableEndX*(m_nWidth + 1) + 1, m_nStartY + m_nAvailableEndY*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(191, 63, 170)); - m_bSetEnd = FALSE; - m_bHaveAEnd = TRUE; - } - if (m_bHaveARoad) - { - CPoint Start; - CPoint Next; - - Next = GetMazeCenter(Out_Path[0][0], Out_Path[0][1]); - - CClientDC dc(this); - CPen pen(PS_SOLID, 5, RGB(186, 156, 202)); - dc.SelectObject(&pen); - - for (int i = 1; i <= Path_Len; ++i){ - Start = GetMazeCenter(Out_Path[i][0], Out_Path[i][1]); - - dc.MoveTo(Next.x, Next.y); - dc.LineTo(Start.x, Start.y); - - Next = Start; - } - } -} - -void CGhostManDlg::OnStnClickedStaticSetstart() -{ - // TODO: ڴӿؼ֪ͨ - if (m_nAlgorithmIndex >= 4) - { - MessageBox(L"ǰ㷨Ҫ", L"Error"); - return; - } - DrawGrid(); - DrawCurMazeColor(); - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETSTART_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETSTART_CLICK)); - m_btnSetStart.SetBitmap(hBmp); - m_btnSetStart.m_nClicked = 1; - - if (m_bHaveAStart) - { - CClientDC dc(this); - switch (g_NewMaze[m_nAvailableStartY][m_nAvailableStartX]) - { - case 1: - DrawAColor(m_nAvailableStartX, m_nAvailableStartY, RGB(244, 241, 241)); - break; - case -1: - DrawAColor(m_nAvailableStartX, m_nAvailableStartY, RGB(139, 174, 133)); - break; - case 2: - DrawAColor(m_nAvailableStartX, m_nAvailableStartY, RGB(140, 191, 217)); - break; - case 3: - DrawAColor(m_nAvailableStartX, m_nAvailableStartY, RGB(230, 230, 179)); - break; - case 4: - DrawAColor(m_nAvailableStartX, m_nAvailableStartY, RGB(191, 225, 184)); - break; - } - m_bHaveAStart = FALSE; - } - m_bSetStart = TRUE; -} - - -void CGhostManDlg::OnStnClickedStaticSetend() -{ - // TODO: ڴӿؼ֪ͨ - if (m_nAlgorithmIndex >= 4) - { - MessageBox(L"ǰ㷨Ҫյ", L"Error"); - return; - } - DrawGrid(); - DrawCurMazeColor(); - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETEND_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETEND_CLICK)); - m_btnSetEnd.SetBitmap(hBmp); - m_btnSetEnd.m_nClicked = 1; - - if (m_bHaveAEnd) - { - CClientDC dc(this); - switch (g_NewMaze[m_nAvailableEndY][m_nAvailableEndX]) - { - case 1: - DrawAColor(m_nAvailableEndX, m_nAvailableEndY, RGB(244, 241, 241)); - break; - case -1: - DrawAColor(m_nAvailableEndX, m_nAvailableEndY, RGB(139, 174, 133)); - break; - case 2: - DrawAColor(m_nAvailableEndX, m_nAvailableEndY, RGB(140, 191, 217)); - break; - case 3: - DrawAColor(m_nAvailableEndX, m_nAvailableEndY, RGB(230, 230, 179)); - break; - case 4: - DrawAColor(m_nAvailableEndX, m_nAvailableEndY, RGB(191, 225, 184)); - break; - } - m_bHaveAEnd = FALSE; - } - m_bSetEnd = TRUE; -} - -bool CGhostManDlg::Check(int x, int y){ - if (x < 0 || y < 0 || x >= MAXX || y >= MAXY){ //ͼԽ - return false; - } - if (g_NewMaze[x][y] == wall || vis[x][y] == visited){ //ǽڼ - return false; - } - return true; -} - - -bool CGhostManDlg::BFS(){ - InitBFStatus(); - queue q; - S[sx][sy].time = 0; - S[sx][sy].x = sx; - S[sx][sy].y = sy; - vis[sx][sy] = visited; - q.push(Point(sx, sy, 0, 0)); - while (!q.empty()){ - Point u, v; - u = q.front(); - q.pop(); - if (u.x == ex && u.y == ey){ - Path_Len = u.deep; - Time = u.time; - Deep = u.deep; - Get_Path(); - //ShowResult(Time, Deep, 0); - return true; - } - for (int i = 0; i < 4; ++i){ - v = u; - v.x += dir_x[i]; - v.y += dir_y[i]; - if (!Check(v.x, v.y)){ - continue; - } - S[v.x][v.y].x = v.x; - S[v.x][v.y].y = v.y; - S[v.x][v.y].pre_x = u.x; - S[v.x][v.y].pre_y = u.y; - v.deep += 1; - if (g_NewMaze[v.x][v.y] == road || g_NewMaze[v.x][v.y] == grass){ - v.time += 1; - } - else if (g_NewMaze[v.x][v.y] == water){ - v.time += 2; - } - else if (g_NewMaze[v.x][v.y] == swamp){ - v.time += 3; - } - vis[v.x][v.y] = visited; - q.push(v); - } - } - - return false; -} - -void CGhostManDlg::Final_BFS() -{ - if (BFS()) - { - m_bHaveARoad = TRUE; - CPoint Start; - CPoint Next; - - Next = GetMazeCenter(Out_Path[0][0], Out_Path[0][1]); - - CClientDC dc(this); - CPen pen(PS_SOLID, 5, RGB(186, 156, 202)); - dc.SelectObject(&pen); - - for (int i = 1; i <= Path_Len; ++i){ - Start = GetMazeCenter(Out_Path[i][0], Out_Path[i][1]); - dc.MoveTo(Next.x, Next.y); - dc.LineTo(Start.x, Start.y); - Next = Start; - } - } - else - { - MessageBox(L"û", L"Error"); - } -} - -void CGhostManDlg::Final_DFS() -{ - InitDFStatus(); - Out_Path[0][0] = sx; - Out_Path[0][1] = sy; - vis[sx][sy] = visited; - DFS(); - if (finded){ - // printf("time = %d\ndeep = %d\n", Time, Deep); - // printf("start at (%d,%d)\n", sx, sy); - CPoint Start; - CPoint Next; - - Next = GetMazeCenter(sx, sy); - - CClientDC dc(this); - CPen pen(PS_SOLID, 5, RGB(186, 156, 202)); - dc.SelectObject(&pen); - - for (int i = 1; i <= Path_Len; ++i){ - Start = GetMazeCenter(Out_Path[i][0], Out_Path[i][1]); - dc.MoveTo(Next.x, Next.y); - dc.LineTo(Start.x, Start.y); - Next = Start; - } - } -} - -void CGhostManDlg::Final_ASTAR() -{ - if (Astar()) - { - m_bHaveARoad = TRUE; - - CPoint Start; - CPoint Next; - - Next = GetMazeCenter(Out_Path[0][0],Out_Path[0][1]); - - CClientDC dc(this); - CPen pen(PS_SOLID, 5, RGB(186, 156, 202)); - dc.SelectObject(&pen); - - for (int i = 1; i <= Path_Len; ++i){ - Start = GetMazeCenter(Out_Path[i][0], Out_Path[i][1]); - - dc.MoveTo(Next.x, Next.y); - dc.LineTo(Start.x, Start.y); - - Next = Start; - } - } - else - { - MessageBox(L"û", L"Error"); - } -} -void CGhostManDlg::Final_IDAStar() -{ -} - - -void CGhostManDlg::Get_Path(){ - while ( !Path.empty() ){ - Path.pop(); - } - int xx = ex, yy = ey; - while (true){ - pair t; - t.first = xx; - t.second = yy; - Path.push(t); - if (xx == sx && yy == sy){ - break; - } - int t1 = xx, t2 = yy; - xx = S[t1][t2].pre_x; - yy = S[t1][t2].pre_y; - } - for (int i = 0; i <= Path_Len; ++i ) - { - pair t; - t = Path.top(); - Path.pop(); - Out_Path[i][0] = t.first; - Out_Path[i][1] = t.second; - } -} - -CPoint CGhostManDlg::GetMazeCenter(int x, int y) -{ - CPoint p; - int nx = 0; - nx = m_nStartX + y * (m_nWidth + 1) + 1; //Ǽ x+1 ӵx - nx += m_nWidth / 2; //ĵ - - int ny = m_nStartY + x * (m_nHeight + 1) + 1; //Ǽ y+1 ӵy - ny += m_nHeight / 2; - - p.x = nx; - p.y = ny; - return p; -} - -void CGhostManDlg::OnTimer(UINT_PTR nIDEvent) -{ - // TODO: ڴϢ/Ĭֵ - switch (nIDEvent) - { - case IDT_DELAY_DRAWGRID: - { - InitDC(); - DrawDC(); - DrawGrid(); - DrawInitMazeColor(); - - KillTimer(IDT_DELAY_DRAWGRID); - break; - } - case IDT_DELAY_CLOSEGRID: - { - if (m_bInitSquared) - { - m_nCurGridTop += 5; - m_nCurGridBottom -= 5; - - if (m_nCurGridBottom > m_nCurGridTop - 5) - { - if (!GetDlgItem(IDC_STATIC_TOP)->IsWindowVisible()) - { - GetDlgItem(IDC_STATIC_TOP)->ShowWindow(SW_SHOW); - GetDlgItem(IDC_STATIC_BOTTOM)->ShowWindow(SW_SHOW); - } - - - - GetDlgItem(IDC_STATIC_TOP)->MoveWindow(m_nCurGridLeft, m_nOriGridTop, - m_nOriGridRight - m_nOriGridLeft, m_nCurGridTop - m_nOriGridTop); - CDC* pDC = GetDlgItem(IDC_STATIC_TOP)->GetDC(); - pDC->BitBlt(0, 0, m_nOriGridRight - m_nOriGridLeft, m_nCurGridTop - m_nOriGridTop, - &m_Dc, m_nCurGridLeft, m_nOriGridTop, SRCCOPY); - GetDlgItem(IDC_STATIC_BOTTOM)->MoveWindow(m_nCurGridLeft, m_nCurGridBottom, - m_nOriGridRight - m_nOriGridLeft, m_nOriGridBottom - m_nCurGridBottom + 2); - - pDC = GetDlgItem(IDC_STATIC_BOTTOM)->GetDC(); - pDC->BitBlt(0, 0, m_nOriGridRight - m_nOriGridLeft, m_nOriGridBottom - m_nCurGridBottom + 5, - &m_Dc, m_nCurGridLeft, m_nCurGridBottom, SRCCOPY); - pDC = GetDC(); - pDC->BitBlt(m_nCurGridLeft, m_nCurGridTop, m_nOriGridRight - m_nOriGridLeft, m_nCurGridBottom - m_nCurGridTop, - &m_GridDc, m_nCurGridLeft, m_nCurGridTop, SRCCOPY); - } - else - { - m_bInitSquared = FALSE; - m_nCurGridTop = m_nOriGridTop; - m_nCurGridBottom = m_nOriGridBottom; - GetDlgItem(IDC_STATIC_TOP)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_STATIC_BOTTOM)->ShowWindow(SW_HIDE); - - GetDlgItem(IDC_STATIC_TOP)->MoveWindow(m_nCurGridLeft, m_nOriGridTop, 0, 0); - GetDlgItem(IDC_STATIC_BOTTOM)->MoveWindow(m_nCurGridLeft, m_nOriGridBottom, 0, 0); - - CDC* pDC = GetDC(); - pDC->BitBlt(m_nStartX, m_nStartY, m_nOriGridRight - m_nOriGridLeft, m_nCurGridBottom - m_nOriGridTop + 5, - &m_Dc, m_nCurGridLeft, m_nCurGridBottom, SRCCOPY); - SetTimer(IDT_DELAY_DRAWIDAPANDA, 200, NULL); - SetTimer(IDT_DELAY_DRAWIDAGRID, 200, NULL); - KillTimer(IDT_DELAY_CLOSEGRID); - } - } - - break; - } - case IDT_DELAY_DRAWIDAPANDA: - { - GetDlgItem(IDC_STATIC_TOP)->MoveWindow(m_nStartX, m_nStartY, 0, 0); - GetDlgItem(IDC_STATIC_BOTTOM)->MoveWindow(m_nStartX, m_nOriGridBottom, 0, 0); - MovePandaToInit(); - m_nCurPandaIndex++; - if (m_nCurPandaIndex >= 1 && m_nCurPandaIndex <= 5) - { - int nBase = IDC_STATIC_PANDA1 - 1; - if (*((int*)g_Squared + m_nCurPandaIndex - 1 ) != 0) - { - - HINSTANCE hIns = AfxFindResourceHandle( - MAKEINTRESOURCE(215 + *((int*)g_Squared + m_nCurPandaIndex - 1)), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, - MAKEINTRESOURCE(215 + *((int*)g_Squared + m_nCurPandaIndex - 1))); - ((CStatic*)GetDlgItem(nBase + m_nCurPandaIndex))->SetBitmap(hBmp); - GetDlgItem(nBase + m_nCurPandaIndex)->ShowWindow(SW_SHOW); - if (m_nCurPandaIndex == 5) - return; - } - else - { - m_nHidedPandaIndex = m_nCurPandaIndex - 1; - } - - if (*((int*)g_Squared + 9 - m_nCurPandaIndex) != 0) - { - HINSTANCE hIns = AfxFindResourceHandle( - MAKEINTRESOURCE(215 + *((int*)g_Squared + 9 - m_nCurPandaIndex)), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, - MAKEINTRESOURCE(215 + *((int*)g_Squared + 9 - m_nCurPandaIndex))); - ((CStatic*)GetDlgItem(nBase + 10 - m_nCurPandaIndex))->SetBitmap(hBmp); - GetDlgItem(nBase + 10 - m_nCurPandaIndex)->ShowWindow(SW_SHOW); - } - else - { - m_nHidedPandaIndex = 9 - m_nCurPandaIndex; - } - } - else - { - m_nCurPandaIndex = 0; - KillTimer(IDT_DELAY_DRAWIDAPANDA); - } - - break; - - } - case IDT_DELAY_DRAWIDAGRID: - { - if (m_nIDACurGridX >= 7 || m_nIDACurGridY >= 7) - { - m_nIDACurGridX = m_nIDACurGridY = 0; - KillTimer(IDT_DELAY_DRAWIDAGRID); - } - - CClientDC dc(this); - switch (g_Derrick[2][m_nIDACurGridY]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + m_nIDACurGridY * 41, - m_nIDAGridStartY + 2 * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + m_nIDACurGridY * 41, - m_nIDAGridStartY + 2 * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + m_nIDACurGridY * 41, - m_nIDAGridStartY + 2*41, 41, 41, RGB(255, 153, 0)); - break; - } - } - switch (g_Derrick[4][m_nIDACurGridY]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + m_nIDACurGridY * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + m_nIDACurGridY * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + m_nIDACurGridY * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - switch (g_Derrick[m_nIDACurGridX][2]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + m_nIDACurGridX * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + m_nIDACurGridX * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + m_nIDACurGridX * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - switch (g_Derrick[m_nIDACurGridX][4]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + m_nIDACurGridX * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + m_nIDACurGridX * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + m_nIDACurGridX * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - m_nIDACurGridX++; - m_nIDACurGridY++; - - break; - } - case IDT_DELAY_REPAINT: - { - m_bNeedRepaint = FALSE; - switch (m_nAlgorithmIndex) - { - case 1: - OnStnClickedStaticAstar(); - break; - case 2: - OnStnClickedStaticBfs(); - break; - case 3: - OnStnClickedStaticDfs(); - break; - case 5: - OnStnClickedStaticSA(); - break; - } - KillTimer(IDT_DELAY_REPAINT); - break; - } - case IDT_DELAY_FLICKER: - { - m_nFlickerTimer += 100; - CClientDC dc(this); - if (m_nFlickerTimer <= 2000) - { - switch (m_nFlickerIndex % 3) - { - case 0: - dc.FillSolidRect(m_nStartX + PResult.x*(m_nWidth + 1) + 1, - m_nStartY + PResult.y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(0, 255, 0)); - break; - case 1: - dc.FillSolidRect(m_nStartX + PResult.x*(m_nWidth + 1) + 1, - m_nStartY + PResult.y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(0, 0, 255)); - break; - case 2: - dc.FillSolidRect(m_nStartX + PResult.x*(m_nWidth + 1) + 1, - m_nStartY + PResult.y*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(0, 255, 255)); - break; - } - m_nFlickerIndex++; - } - else - { - m_nFlickerIndex = 0; - m_nFlickerTimer = 0; - KillTimer(IDT_DELAY_FLICKER); - } - } - } - CDialogEx::OnTimer(nIDEvent); -} - - -DWORD CGhostManDlg::ExpandAstarFunction(LPARAM lParam) -{ - CGhostManDlg* dlg = (CGhostManDlg*)lParam; - if (dlg->ExAstar()) - { - dlg->m_bHaveARoad = TRUE; - CPoint Start; - CPoint Next; - - Next = dlg->GetMazeCenter(Out_Path[0][0], Out_Path[0][1]); - - CClientDC dc(dlg); - CPen pen(PS_SOLID, 5, RGB(186, 156, 202)); - dc.SelectObject(&pen); - - for (int i = 1; i <= Path_Len; ++i){ - Start = dlg->GetMazeCenter(Out_Path[i][0],Out_Path[i][1]); - dc.MoveTo(Next.x, Next.y); - dc.LineTo(Start.x, Start.y); - Next = Start; - - } - } - - dlg->m_bFirstStep = FALSE; - dlg->m_bByStep = FALSE; - dlg->m_bClickStep = FALSE; - - return 0; -} - -DWORD CGhostManDlg::ExpandBFSFunction(LPARAM lParam) -{ - CGhostManDlg* dlg = (CGhostManDlg*)lParam; - if (dlg->ExBFS()) - { - dlg->m_bHaveARoad = TRUE; - CPoint Start; - CPoint Next; - - Next = dlg->GetMazeCenter(Out_Path[0][0], Out_Path[0][1]); - - CClientDC dc(dlg); - CPen pen(PS_SOLID, 5, RGB(186, 156, 202)); - dc.SelectObject(&pen); - - for (int i = 1; i <= Path_Len; ++i){ - Start = dlg->GetMazeCenter(Out_Path[i][0], Out_Path[i][1]); - dc.MoveTo(Next.x, Next.y); - dc.LineTo(Start.x, Start.y); - Next = Start; - - } - } - - dlg->m_bFirstStep = FALSE; - dlg->m_bByStep = FALSE; - dlg->m_bClickStep = FALSE; - - return 0; -} -DWORD CGhostManDlg::ExpandIDAStarFunction(LPARAM lParam) -{ - CGhostManDlg* dlg = (CGhostManDlg*)lParam; - int nBase = IDC_STATIC_PANDA1; - int k = 0; - dlg->InitDerrick(); - if (!dlg->IDA_check(s)){ - } - else{ - if (!dlg->IDA_star(s)) - { - return -1; - } - - int nBase = IDC_STATIC_PANDA1; - for (int i = 0; i < limit; ++i){ - - switch (IDA_Path[i]) - { - case 'r': - { - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex))->ShowWindow(SW_SHOW); - HINSTANCE hIns = AfxFindResourceHandle( - MAKEINTRESOURCE(215 + *((int*)g_Squared + dlg->m_nHidedPandaIndex + 1)), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, - MAKEINTRESOURCE(215 + *((int*)g_Squared + dlg->m_nHidedPandaIndex + 1))); - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex))->SetBitmap(hBmp); - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex + 1))->ShowWindow(SW_HIDE); - - int n = 0; - n = *((int*)g_Squared + dlg->m_nHidedPandaIndex + 1); - *((int*)g_Squared + dlg->m_nHidedPandaIndex + 1) = *((int*)g_Squared + dlg->m_nHidedPandaIndex); - *((int*)g_Squared + dlg->m_nHidedPandaIndex) = n; - dlg->m_nHidedPandaIndex += 1; - - break; - } - case 'd': - { - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex))->ShowWindow(SW_SHOW); - HINSTANCE hIns = AfxFindResourceHandle( - MAKEINTRESOURCE(215 + *((int*)g_Squared + dlg->m_nHidedPandaIndex + 3)), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, - MAKEINTRESOURCE(215 + *((int*)g_Squared + dlg->m_nHidedPandaIndex + 3))); - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex))->SetBitmap(hBmp); - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex + 3))->ShowWindow(SW_HIDE); - - int n = 0; - n = *((int*)g_Squared + dlg->m_nHidedPandaIndex + 3); - *((int*)g_Squared + dlg->m_nHidedPandaIndex + 3) = *((int*)g_Squared + dlg->m_nHidedPandaIndex); - *((int*)g_Squared + dlg->m_nHidedPandaIndex) = n; - - dlg->m_nHidedPandaIndex += 3; - break; - } - case 'l': - { - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex))->ShowWindow(SW_SHOW); - HINSTANCE hIns = AfxFindResourceHandle( - MAKEINTRESOURCE(215 + *((int*)g_Squared + dlg->m_nHidedPandaIndex - 1)), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, - MAKEINTRESOURCE(215 + *((int*)g_Squared + dlg->m_nHidedPandaIndex - 1))); - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex))->SetBitmap(hBmp); - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex - 1))->ShowWindow(SW_HIDE); - int n = 0; - n = *((int*)g_Squared + dlg->m_nHidedPandaIndex - 1); - *((int*)g_Squared + dlg->m_nHidedPandaIndex - 1) = *((int*)g_Squared + dlg->m_nHidedPandaIndex); - *((int*)g_Squared + dlg->m_nHidedPandaIndex) = n; - - dlg->m_nHidedPandaIndex -= 1; - break; - } - case 'u': - { - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex))->ShowWindow(SW_SHOW); - HINSTANCE hIns = AfxFindResourceHandle( - MAKEINTRESOURCE(215 + *((int*)g_Squared + dlg->m_nHidedPandaIndex - 3)), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, - MAKEINTRESOURCE(215 + *((int*)g_Squared + dlg->m_nHidedPandaIndex - 3))); - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex))->SetBitmap(hBmp); - ((CStatic*)dlg->GetDlgItem(nBase + dlg->m_nHidedPandaIndex - 3))->ShowWindow(SW_HIDE); - - int n = 0; - n = *((int*)g_Squared + dlg->m_nHidedPandaIndex - 3); - *((int*)g_Squared + dlg->m_nHidedPandaIndex - 3) = *((int*)g_Squared + dlg->m_nHidedPandaIndex); - *((int*)g_Squared + dlg->m_nHidedPandaIndex) = n; - dlg->m_nHidedPandaIndex -= 3; - break; - } - } - dlg->Invalidate(); - Sleep(300); - } - - dlg->m_btnPanda9.ShowWindow(SW_HIDE); - dlg->PostMessage(WM_PAINT_PANDA); - } - return 0; -} - -DWORD CGhostManDlg::ExpandDFSFunction(LPARAM lParam) -{ - CGhostManDlg* dlg = (CGhostManDlg*)lParam; - if (dlg->ExDFS()) - { - dlg->m_bHaveARoad = TRUE; - CPoint Start; - CPoint Next; - - Next = dlg->GetMazeCenter(sx, sy); - - CClientDC dc(dlg); - CPen pen(PS_SOLID, 5, RGB(186, 156, 202)); - dc.SelectObject(&pen); - - for (int i = 1; i <= Path_Len; ++i){ - Start = dlg->GetMazeCenter(Out_Path[i][0], Out_Path[i][1]); - dc.MoveTo(Next.x, Next.y); - dc.LineTo(Start.x, Start.y); - Next = Start; - } - } - - dlg->m_bFirstStep = FALSE; - dlg->m_bByStep = FALSE; - dlg->m_bClickStep = FALSE; - - return 0; -} - -DWORD CGhostManDlg::RandIDAGridFunction(LPARAM lParam) -{ - CGhostManDlg* dlg = (CGhostManDlg*)lParam; - dlg->RandIDAGrid(); - dlg->m_bInitSquared = TRUE; - - return 0; -} - -bool CGhostManDlg::ExBFS() -{ - InitBFStatus(); - queue q; - S[sx][sy].time = 0; - S[sx][sy].x = sx; - S[sx][sy].y = sy; - vis[sx][sy] = visited; - q.push(Point(sx, sy, 0, 0)); - - while (!q.empty()){ - Point u, v; - u = q.front(); - //uΪǰ㣬Ϊɫ - if ((u.x == sx && u.y == sy) || (u.x == ex && u.y == ey)) - { - } - else - { - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + u.y*(m_nWidth + 1) + 1, - m_nStartY + u.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(215, 233, 124)); - if (m_bInternalShow) Sleep(50); - } - - q.pop(); - if (u.x == ex && u.y == ey){ - Path_Len = u.deep; - Time = u.time; - Deep = u.deep; - Get_Path(); - //ShowResult(Time, Deep, 0); - return true; - } - for (int i = 0; i < 4; ++i){ - v = u; - v.x += dir_x[i]; - v.y += dir_y[i]; - if (!Check(v.x, v.y)){ - continue; - } - S[v.x][v.y].x = v.x; - S[v.x][v.y].y = v.y; - S[v.x][v.y].pre_x = u.x; - S[v.x][v.y].pre_y = u.y; - v.deep += 1; - if (g_NewMaze[v.x][v.y] == road || g_NewMaze[v.x][v.y] == grass){ - v.time += 1; - } - else if (g_NewMaze[v.x][v.y] == water){ - v.time += 2; - } - else if (g_NewMaze[v.x][v.y] == swamp){ - v.time += 3; - } - vis[v.x][v.y] = visited; - q.push(v); - if ((v.x == sx && v.y == sy) || (v.x == ex && v.y == ey)) - { - } - else{ - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + v.y*(m_nWidth + 1) + 1, - m_nStartY + v.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(102, 137, 205)); - if (m_bInternalShow) Sleep(50); - } - - //4Ϊɫ - - } - if (m_bByStep) - { - while (1) - { - if (m_bClickStep) - { - m_bClickStep = FALSE; - break; - } - else - { - } - } - } - if ((u.x == sx && u.y == sy) || (u.x == ex && u.y == ey)) - { - } - else - { - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + u.y*(m_nWidth + 1) + 1, - m_nStartY + u.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(205, 191, 179)); - - if(m_bInternalShow) Sleep(50); - } - //uΪɫ - } - - return false; -} - -int CGhostManDlg::h(Point p) -{ - return (abs(p.x - ex) + abs(p.y - ey)); -} - -bool CGhostManDlg::ExAstar(){ - InitAstartatus(); - priority_queue pq; - vis[sx][sy] = visited; - if (sx == ex && sy == ey){ //յغ - return true; - } - S[sx][sy].x = sx; - S[sx][sy].y = sy; - Point t(sx, sy, 0, 0); - t.g = 0; - t.h = h(t); - t.f = t.h + t.g; - pq.push(t); - Point u, v; - while (!pq.empty()){ - u = pq.top(); - pq.pop(); - if (u.x == ex && u.y == ey){ - Path_Len = u.deep; - Time = u.time; - Deep = u.deep; - Get_Path(); - //ShowResult(Time, Deep, 0); - return true; - } - //uΪǰ㣬Ϊɫ - if ((u.x == sx && u.y == sy) || (u.x == ex && u.y == ey)) - { - } - else - { - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + u.y*(m_nWidth + 1) + 1, - m_nStartY + u.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(215, 233, 124)); - if (m_bInternalShow) Sleep(50); - } - for (int i = 0; i < 4; ++i){ - v = u; - v.x += dir_x[i]; - v.y += dir_y[i]; - if (!Check(v.x, v.y)) continue; - vis[v.x][v.y] = visited; - S[v.x][v.y].x = v.x; - S[v.x][v.y].y = v.y; - S[v.x][v.y].pre_x = u.x; - S[v.x][v.y].pre_y = u.y; - if (g_NewMaze[v.x][v.y] == road || g_NewMaze[v.x][v.y] == grass){ - v.time += 1; - v.g += 1; - } - else if (g_NewMaze[v.x][v.y] == water){ - v.time += 2; - v.g += 2; - } - else if (g_NewMaze[v.x][v.y] == swamp){ - v.time += 3; - v.g += 3; - } - v.h = h(v); - v.f = v.g + v.h; - v.deep++; - pq.push(v); - if ((v.x == sx && v.y == sy) || (v.x == ex && v.y == ey)) - { - } - else{ - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + v.y*(m_nWidth + 1) + 1, - m_nStartY + v.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(102, 137, 205)); - if (m_bInternalShow) Sleep(50); - } - } - if (m_bByStep) - { - while (1) - { - if (m_bClickStep) - { - m_bClickStep = FALSE; - break; - } - else - { - } - } - } - if ((u.x == sx && u.y == sy) || (u.x == ex && u.y == ey)) - { - } - else{ - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + u.y*(m_nWidth + 1) + 1, - m_nStartY + u.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(205, 191, 179)); - - if (m_bInternalShow) Sleep(50); - } - } - return false; -} - - -bool CGhostManDlg::Astar(){ - InitAstartatus(); - priority_queue pq; - vis[sx][sy] = visited; - if (sx == ex && sy == ey){ //յغ - return true; - } - S[sx][sy].x = sx; - S[sx][sy].y = sy; - Point t(sx, sy, 0, 0); - t.g = 0; - t.h = h(t); - t.f = t.h + t.g; - pq.push(t); - Point u, v; - while (!pq.empty()){ - u = pq.top(); - pq.pop(); - if (u.x == ex && u.y == ey){ - Path_Len = u.deep; - Time = u.time; - Deep = u.deep; - Get_Path(); - return true; - } - for (int i = 0; i < 4; ++i){ - v = u; - v.x += dir_x[i]; - v.y += dir_y[i]; - if (!Check(v.x, v.y)) continue; - vis[v.x][v.y] = visited; - S[v.x][v.y].x = v.x; - S[v.x][v.y].y = v.y; - S[v.x][v.y].pre_x = u.x; - S[v.x][v.y].pre_y = u.y; - if (g_NewMaze[v.x][v.y] == road || g_NewMaze[v.x][v.y] == grass){ - v.time += 1; - v.g += 1; - } - else if (g_NewMaze[v.x][v.y] == water){ - v.time += 2; - v.g += 2; - } - else if (g_NewMaze[v.x][v.y] == swamp){ - v.time += 3; - v.g += 3; - } - v.h = h(v); - v.f = v.g + v.h; - v.deep++; - pq.push(v); - } - } - return false; -} - - -void CGhostManDlg::OnStnClickedStaticClose() -{ - // TODO: ڴӿؼ֪ͨ - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_CLOSE_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_CLOSE_CLICK)); - m_btnClose.SetBitmap(hBmp); - - Sleep(300); - PostMessage(WM_CLOSE); -} - - -void CGhostManDlg::OnStnClickedStaticMin() -{ - // TODO: ڴӿؼ֪ͨ - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_MIN_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_MIN_CLICK)); - m_btnMin.SetBitmap(hBmp); - - Sleep(300); - PostMessage(WM_SYSCOMMAND, SC_MINIMIZE, 0); -} - - -void CGhostManDlg::OnStnClickedStaticMax() -{ - // TODO: ڴӿؼ֪ͨ - PostMessage(WM_SYSCOMMAND, SC_MAXIMIZE, 0);// -} - -void CGhostManDlg::OnStnClickedStaticDynamic() -{ - // TODO: ڴӿؼ֪ͨ - if (m_nAlgorithmIndex >= 4) - { - MessageBox(L"ǰ㷨ִֶ֧̬", L"Error"); - return; - } - if (m_bByStep) - { - m_bInternalShow = TRUE; - m_bFirstStep = FALSE; - m_bByStep = FALSE; //߳´ξͲҪٴεȴťӦ - m_bClickStep = TRUE; //̵߳ĵȴ״̬õִе̵ִ߳ - return; - } - - m_bInternalShow = TRUE; - - switch (m_nAlgorithmIndex) - { - case 1: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandAstarFunction, - this, NULL, NULL)); - break; - } - case 2: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandBFSFunction, - this, NULL, NULL)); - break; - } - case 3: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandDFSFunction, - this, NULL, NULL)); - break; - } - default: - { - MessageBox(L"Please Choose An algorithm", L"Error"); - break; - } - } -} - - -void CGhostManDlg::OnStnClickedStaticInit() -{ - // TODO: ڴӿؼ֪ͨ - InitStatus(); - InitBFStatus(); - InitDFStatus(); - InitAstartatus(); - memcpy(g_NewMaze, g_maze, sizeof(int)*MAXX*MAXY); - - if (m_nAlgorithmIndex <= 3) - { - DrawGrid(); - DrawCurMazeColor(); - } - else if (m_nAlgorithmIndex == 5) - { - DrawGrid(); - DrawInitSAMaze(); - } - -} - - -void CGhostManDlg::OnStnClickedStaticExec() -{ - // TODO: ڴӿؼ֪ͨ - - if (m_nAlgorithmIndex <= 3) - { - m_bHaveAResult = FALSE; - if (!m_bHaveAStart) - { - MessageBox(L"Please Choose A StartPoint", L"Error"); - return; - } - if (!m_bHaveAEnd) - { - MessageBox(L"Please Choose A EndPoint", L"Error"); - return; - } - m_bHaveARoad = FALSE; - - DrawCurMazeColor(); - DrawGrid(); - } - else if (m_nAlgorithmIndex >= 4) - { - m_bHaveAResult = FALSE; - m_bHaveARoad = FALSE; - } - - switch (m_nAlgorithmIndex) - { - case 1: - { - Final_ASTAR(); - break; - } - case 2: - { - Final_BFS(); - break; - } - case 3: - { - Final_DFS(); - break; - } - case 4: - { - // Final_IDAStar(); - CloseHandle(CreateThread(0, 0, - (LPTHREAD_START_ROUTINE)ExpandIDAStarFunction, this, 0, 0)); - break; - } - case 5: - { - Final_SA(); - break; - } - default: - { - MessageBox(L"Please Choose An algorithm", L"Error"); - break; - } - } - -} - -void CGhostManDlg::Final_SA() -{ - cnt = 0; - x = 20, y = 40; - e1 = SAPoint(0, 0); - e2 = SAPoint(x, y); - for (int i = 0; i < MAXX; ++i){ - for (int j = 0; j < MAXY; ++j){ - if (g_SaNewMaze[i][j] == 2){ - p[cnt].x = i; - p[cnt++].y = j; - } - } - } - SA(max(x, y)); - m_bHaveAResult = TRUE; - SetTimer(IDT_DELAY_FLICKER, 100, NULL); -} -void CGhostManDlg::OnStnClickedStaticStep() -{ - // TODO: ڴӿؼ֪ͨ - if (m_nAlgorithmIndex >= 4) - { - MessageBox(L"ǰ㷨ִֵ֧", L"Error"); - return; - } - if (!m_bFirstStep) //һν뵥 - { - m_bFirstStep = TRUE; - m_bByStep = TRUE; - - switch (m_nAlgorithmIndex) - { - case 1: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandAstarFunction, - this, NULL, NULL)); - break; - } - case 2: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandBFSFunction, - this, NULL, NULL)); - break; - } - case 3: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandDFSFunction, - this, NULL, NULL)); - break; - } - default: - { - MessageBox(L"Please Choose An algorithm", L"Error"); - m_bFirstStep = FALSE; - break; - } - } - } - else - { - if (m_nAlgorithmIndex == 0) - { - MessageBox(L"Please Choose An algorithm", L"Error"); - } - } - m_bClickStep = TRUE; - - -} - - -void CGhostManDlg::OnStnClickedStaticStatic() -{ - // TODO: ڴӿؼ֪ͨ - if (m_nAlgorithmIndex >= 4) - { - MessageBox(L"ǰ㷨֧־ִ̬", L"Error"); - return; - } - DrawCurMazeColor(); - DrawGrid(); - if (m_bByStep) - { - m_bFirstStep = FALSE; - m_bByStep = FALSE; //߳´ξͲҪٴεȴťӦ - m_bClickStep = TRUE; //̵߳ĵȴ״̬õִе̵ִ߳ - return; - } - - m_bInternalShow = FALSE; - switch (m_nAlgorithmIndex) - { - case 1: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandAstarFunction, - this, NULL, NULL)); - break; - } - case 2: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandBFSFunction, - this, NULL, NULL)); - break; - } - case 3: - { - CloseHandle(CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ExpandDFSFunction, - this, NULL, NULL)); - break; - } - default: - { - MessageBox(L"Please Choose An algorithm", L"Error"); - break; - } - } -} - -void CGhostManDlg::OnStnClickedStaticAstar() -{ - // TODO: ڴӿؼ֪ͨ -// MovePandaToZero(); - - for (int i = 1; i < 10; i++) - { - GetDlgItem(1033 + i)->ShowWindow(SW_HIDE); - } - m_nIDACurGridX = m_nIDACurGridY = 0; - m_nCurPandaIndex = 0; - KillTimer(IDT_DELAY_DRAWIDAGRID); - KillTimer(IDT_DELAY_DRAWIDAPANDA); - if (!GetDlgItem(IDC_STATIC_INTRODUCTION)->IsWindowVisible()) - { - GetDlgItem(IDC_STATIC_INTRODUCTION)->ShowWindow(SW_SHOW); - } - OnStnClickedStaticInit(); - ClearAlgorithmCursor(); - m_btnAStar.m_nClicked = 0; - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_ASTAR_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_ASTAR_CLICK)); - m_btnAStar.SetBitmap(hBmp); - - m_btnAStar.m_nClicked = 1; - m_nAlgorithmIndex = 1; - - if (m_bNeedRepaint) - SetTimer(IDT_DELAY_REPAINT, 30, NULL); - -} - -void CGhostManDlg::OnStnClickedStaticBfs() -{ - // TODO: ڴӿؼ֪ͨ - for (int i = 1; i < 10; i++) - { - GetDlgItem(1033 + i)->ShowWindow(SW_HIDE); - } - m_nIDACurGridX = m_nIDACurGridY = 0; - m_nCurPandaIndex = 0; - KillTimer(IDT_DELAY_DRAWIDAGRID); - KillTimer(IDT_DELAY_DRAWIDAPANDA); - if (!GetDlgItem(IDC_STATIC_INTRODUCTION)->IsWindowVisible()) - { - GetDlgItem(IDC_STATIC_INTRODUCTION)->ShowWindow(SW_SHOW); - } - OnStnClickedStaticInit(); - ClearAlgorithmCursor(); - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_BFS_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_BFS_CLICK)); - - m_btnBFS.SetBitmap(hBmp); - m_btnBFS.m_nClicked = 1; - m_nAlgorithmIndex = 2; - - if (m_bNeedRepaint) - SetTimer(IDT_DELAY_REPAINT, 30, NULL); -} - - -void CGhostManDlg::OnStnClickedStaticDfs() -{ - // TODO: ڴӿؼ֪ͨ - for (int i = 1; i < 10; i++) - { - GetDlgItem(1033 + i)->ShowWindow(SW_HIDE); - } - m_nIDACurGridX = m_nIDACurGridY = 0; - m_nCurPandaIndex = 0; - KillTimer(IDT_DELAY_DRAWIDAGRID); - KillTimer(IDT_DELAY_DRAWIDAPANDA); - - if (!GetDlgItem(IDC_STATIC_INTRODUCTION)->IsWindowVisible()) - { - GetDlgItem(IDC_STATIC_INTRODUCTION)->ShowWindow(SW_SHOW); - } - OnStnClickedStaticInit(); - ClearAlgorithmCursor(); - m_btnDFS.m_nClicked = 1; - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_DFS_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_DFS_CLICK)); - m_btnDFS.SetBitmap(hBmp); - m_nAlgorithmIndex = 3; - - if (m_bNeedRepaint) - SetTimer(IDT_DELAY_REPAINT, 30, NULL); -} - - -void CGhostManDlg::OnStnClickedStaticIdastar() -{ - // TODO: ڴӿؼ֪ͨ - m_bNeedRepaint = TRUE; - CloseHandle(CreateThread(0, 0, (LPTHREAD_START_ROUTINE)RandIDAGridFunction, this, 0, 0)); - - for (int i = 1; i <= 9;i++) - { - GetDlgItem(1033 + i)->ShowWindow(SW_HIDE); - } - GetDlgItem(IDC_STATIC_INTRODUCTION)->ShowWindow(SW_HIDE); - ClearAlgorithmCursor(); - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_CLICK)); - m_btnIDAStar.SetBitmap(hBmp); - m_btnIDAStar.m_nClicked = 1; - m_nAlgorithmIndex = 4; - - SetTimer(IDT_DELAY_CLOSEGRID, 10, NULL); -} - - -void CGhostManDlg::OnStnClickedStaticSA() -{ - // TODO: ڴӿؼ֪ͨ - m_btnSA.m_nClicked = 1; - m_nAlgorithmIndex = 5; - for (int i = 1; i <= 9; i++) - { - GetDlgItem(1033 + i)->ShowWindow(SW_HIDE); - } - m_nIDACurGridX = m_nIDACurGridY = 0; - m_nCurPandaIndex = 0; - KillTimer(IDT_DELAY_DRAWIDAGRID); - KillTimer(IDT_DELAY_DRAWIDAPANDA); - - GetDlgItem(IDC_STATIC_INTRODUCTION)->ShowWindow(SW_HIDE); - ClearAlgorithmCursor(); - OnStnClickedStaticInit(); - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SA_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SA_CLICK)); - m_btnSA.SetBitmap(hBmp); - m_btnSA.m_nClicked = 1; - - if (m_bNeedRepaint) - SetTimer(IDT_DELAY_REPAINT, 30, NULL); - -} - -void CGhostManDlg::ClearAlgorithmCursor() -{ - m_btnAStar.m_nClicked = 0; - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_ASTAR_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_ASTAR_NORMAL)); - m_btnAStar.SetBitmap(hBmp); - - m_btnBFS.m_nClicked = 0; - hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_BFS_NORMAL), RT_GROUP_ICON); - hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_BFS_NORMAL)); - m_btnBFS.SetBitmap(hBmp); - - m_btnDFS.m_nClicked = 0; - hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_DFS_NORMAL), RT_GROUP_ICON); - hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_DFS_NORMAL)); - m_btnDFS.SetBitmap(hBmp); - - m_btnIDAStar.m_nClicked = 0; - hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_NORMAL), RT_GROUP_ICON); - hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_NORMAL)); - m_btnIDAStar.SetBitmap(hBmp); - - m_btnSA.m_nClicked = 0; - hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SA_NORMAL), RT_GROUP_ICON); - hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SA_NORMAL)); - m_btnSA.SetBitmap(hBmp); -} - -void CGhostManDlg::OnMove(int x, int y) -{ - CDialogEx::OnMove(x, y); - - if (m_nAlgorithmIndex <= 3) - { - DrawGrid(); - DrawCurMazeColor(); - } - - // TODO: ڴ˴Ϣ -} - - -BOOL CGhostManDlg::OnEraseBkgnd(CDC* pDC) -{ - // TODO: ڴϢ/Ĭֵ - -// return CDialogEx::OnEraseBkgnd(pDC); - return TRUE; -} - - -void CGhostManDlg::InitDC() -{ - if (m_Dc.GetSafeHdc() != NULL) - { - m_Dc.DeleteDC(); - } - if (m_BitMap.GetSafeHandle() != NULL) - { - m_BitMap.DeleteObject(); - } - - CDC* pNewDc = this->GetDC(); - m_Dc.CreateCompatibleDC(pNewDc); - - CRect rc; - GetWindowRect(rc); - ScreenToClient(rc); - - m_BitMap.CreateCompatibleBitmap(pNewDc, rc.Width(), rc.Height()); - m_Dc.SelectObject(&m_BitMap); - ReleaseDC(pNewDc); - -} - -void CGhostManDlg::DrawDC() -{ - CRect rect; - //佲ÿؼĻеλ - GetDlgItem(IDC_STATIC_PIC)->GetWindowRect(&rect);//ȡؼĻλ,ؼ - ScreenToClient(rect);//תΪԻϵλ - - CDC* pDc = GetDC(); - m_Dc.BitBlt(rect.left, rect.top, rect.Width()+5, rect.Height()+5, pDc, rect.left, rect.top, SRCCOPY); -} - -bool CGhostManDlg::DFS(){ //ھǹõľͲҪ,ﴫIJΪ - Out_Path[0][0] = sx; - Out_Path[0][1] = sy; - Point p(sx, sy, 0, 0); - Point u, v; - sta.push(p); - vis[sx][sy] = visited; - while (!sta.empty()){ - u = sta.top(); - if (u.x == ex && u.y == ey){ - finded = 1; - Path_Len = v.deep; - Time = v.time; - Deep = v.deep; - break; - } - int i = 0; - for (i = 0; i < 4; ++i){ - v = u; - v.x += dir_x[i]; - v.y += dir_y[i]; - v.deep += 1; - if (!Check(v.x, v.y)){ - continue; - } - if (g_NewMaze[v.x][v.y] == road || g_NewMaze[v.x][v.y] == grass){ - v.time++; - } - else if (g_NewMaze[v.x][v.y] == water){ - v.time += 2; - } - else if (g_NewMaze[v.x][v.y] == swamp){ - v.time += 3; - } - vis[v.x][v.y] = visited; - sta.push(v); - Out_Path[v.deep][0] = v.x; - Out_Path[v.deep][1] = v.y; - break; - } - if (i == 4) sta.pop(); - } - if (finded){ - return true; - } - else{ - return false; - } -} -bool CGhostManDlg::ExDFS(){ //ھǹõľͲҪ,ﴫIJΪ - Out_Path[0][0] = sx; - Out_Path[0][1] = sy; - Point p(sx, sy, 0, 0); - Point u, v; - sta.push(p); - vis[sx][sy] = visited; - while (!sta.empty()){ - u = sta.top(); - if (u.x == ex && u.y == ey){ - finded = 1; - Path_Len = v.deep; - Time = v.time; - Deep = v.deep; - break; - } - if ((u.x == sx && u.y == sy) || (u.x == ex && u.y == ey)) - { - } - else - { - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + u.y*(m_nWidth + 1) + 1, - m_nStartY + u.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(215, 233, 124)); - if (m_bInternalShow) Sleep(50); - } - int i = 0; - for (i = 0; i < 4; ++i){ - v = u; - v.x += dir_x[i]; - v.y += dir_y[i]; - v.deep += 1; - if (!Check(v.x, v.y)){ - continue; - } - if (g_NewMaze[v.x][v.y] == road || g_NewMaze[v.x][v.y] == grass){ - v.time++; - } - else if (g_NewMaze[v.x][v.y] == water){ - v.time += 2; - } - else if (g_NewMaze[v.x][v.y] == swamp){ - v.time += 3; - } - vis[v.x][v.y] = visited; - sta.push(v); - Out_Path[v.deep][0] = v.x; - Out_Path[v.deep][1] = v.y; - - if ((v.x == sx && v.y == sy) || (v.x == ex && v.y == ey)) - { - } - else{ - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + v.y*(m_nWidth + 1) + 1, - m_nStartY + v.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(102, 137, 205)); - if (m_bInternalShow) Sleep(50); - } - break; - } - if ((u.x == sx && u.y == sy) || (u.x == ex && u.y == ey)) - { - } - else{ - CClientDC dc(this); - dc.FillSolidRect(m_nStartX + u.y*(m_nWidth + 1) + 1, - m_nStartY + u.x*(m_nHeight + 1) + 1, m_nWidth, m_nHeight, RGB(205, 191, 179)); - - if (m_bInternalShow) Sleep(50); - } - if (i == 4) sta.pop(); - if (m_bByStep) - { - while (1) - { - if (m_bClickStep) - { - m_bClickStep = FALSE; - break; - } - else - { - } - } - } - } - if (finded){ - return true; - } - else{ - return false; - } -} - -void CGhostManDlg::RandIDAGrid() -{ - - for (int i = 0; i < 9; i++) - { - *((int*)g_Squared + i) = -1; - } - srand((unsigned int)time(0)); - - int* pSquared = (int*)g_Squared; - int nTemp = 0; - - while (1) - { - for (int i = 0; i < 9; i++) - { - nTemp = rand() % 9; - while (!CheckNum(nTemp, i)) - { - nTemp = rand() % 9; - } - *(pSquared + i) = nTemp; - } - InitIDAstarstatus(); - if (IDA_check(s)) - { - break; - } - } - - -} - -bool CGhostManDlg::CheckNum(int nNum, int nIndex) -{ - for (int i = 0; i < nIndex;i++) - { - if (nNum == *((int*)g_Squared + i)) - return false; - } - return true; -} - -void CGhostManDlg::MovePandaToZero() -{ - for (int i = 1; i < 10; i++) - { - GetDlgItem(1033 + i)->MoveWindow(m_rcPanda[0].left, m_rcPanda[0].top,0,0); - } -} -void CGhostManDlg::MovePandaToInit() -{ - for (int i = 1; i < 10; i++) - { - GetDlgItem(1033 + i)->MoveWindow(m_rcPanda[i-1]); - } -} - -LRESULT CGhostManDlg::OnRepaintGrid(WPARAM wParam, LPARAM lParam) -{ - return 0; -} - -int CGhostManDlg::IDA_h(IDA_S s){ - int ans = 0, i, j; - for (i = 0; i < 3; ++i){ - for (j = 0; j < 3; ++j){ - if (s.maze[i][j]){ - ans += abs(i - (s.maze[i][j] - 1) / 3) + abs(j - (s.maze[i][j] - 1) % 3); - } - } - } - return ans; -} - -int CGhostManDlg::IDA_dfs(IDA_S s){ - s.h = IDA_h(s); - if (s.h == 0){ - ok = 1; - return s.step; - } - //˴һͿܵIJ - if (s.h + s.step > limit) return s.h + s.step; - int minn = 0x7fffffff; - IDA_S v; - for (int i = 0; i < 4; ++i){ - if (abs(i - s.pre) == 2) continue; - v = s; - v.x += dir_x[i]; - v.y += dir_y[i]; - v.step += 1; - v.pre = i; - if (v.x < 0 || v.y < 0 || v.x >= 3 || v.y >= 3){ - continue; - } - buff[s.step] = i; - swap(v.maze[s.x][s.y], v.maze[v.x][v.y]); - int tmp = IDA_dfs(v); - if (ok) return tmp; - minn = min(tmp, minn); - } - return minn; -} - - -//IDA* -bool CGhostManDlg::IDA_star(IDA_S s){ - ok = 0, limit = 0; - for (int i = 0; i < 3; ++i){ - for (int j = 0; j < 3; ++j){ - s.maze[i][j] = g_Squared[i][j]; - if (!g_Squared[i][j]){ - s.x = i; - s.y = j; - } - } - } - s.pre = -233; - clr(buff, -1); - s.h = IDA_h(s); - if (s.h == 0){ -// puts("Ѿ״̬ˣҪƶ"); - MessageBox(L"ƶ", L"Error"); - } - if (!IDA_check(s)){ - MessageBox(L"ͼ޽", L"Error"); - return false; - } - while (ok == 0 && limit <= 30){ - limit = IDA_dfs(s); - } - if (ok == 1){ - for (int i = 0; i < limit; ++i){ - IDA_Path[i] = op[buff[i]]; - } - } - else{ - return false; - } - return false; -} - -//ż״̬飬ڼ֦㷨Ч -bool CGhostManDlg::IDA_check(IDA_S s){ - int a[9], k = 0, i, j; - for (i = 0; i < 3; ++i){ - for (j = 0; j < 3; ++j){ - a[k++] = s.maze[i][j]; - } - } - int sum = 0; - for (i = 0; i < 9; ++i){ - for (j = i + 1; j < 9; ++j){ - if (a[j] && a[i] && a[i] > a[j]){ - ++sum; - } - } - } - return !(sum & 1); -} - -LRESULT CGhostManDlg::OnPaintPanda(WPARAM wParam, LPARAM lParam) -{ - - DrawInitDerrick(); - Sleep(300); - CloseHandle(CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ExpandDerrickIDAFunction, this, 0, 0)); - return 0; -} - -void CGhostManDlg::DrawInitDerrick() -{ - - - CClientDC dc(this); - - for (int j = 0; j < 7;j++) - { - switch (g_Derrick[2][j]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 2 * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 2 * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 2 * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - switch (g_Derrick[4][j]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - } - - for (int i = 0; i < 7; i++) - { - switch (g_Derrick[i][2]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - switch (g_Derrick[i][4]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - - } - -} -void CGhostManDlg::DrawCurDerrick() -{ - CClientDC dc(this); - - for (int j = 0; j < 7; j++) - { - switch (g_NewDerrick[2][j]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 2 * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 2 * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 2 * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - switch (g_NewDerrick[4][j]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + j * 41, - m_nIDAGridStartY + 4 * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - } - - for (int i = 0; i < 7; i++) - { - switch (g_NewDerrick[i][2]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + 2 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - switch (g_NewDerrick[i][4]) - { - case 1: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(0, 255, 0)); - break; - } - case 2: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(7, 158, 239)); - break; - } - case 3: - { - dc.FillSolidRect(m_nIDAGridStartX + 4 * 41, - m_nIDAGridStartY + i * 41, 41, 41, RGB(255, 153, 0)); - break; - } - } - - } -} -void CGhostManDlg::InitDerrick() -{ - memcpy(g_NewDerrick, g_Derrick, sizeof(g_Derrick)); -} - -void CGhostManDlg::rota_A(){ - int t = g_NewDerrick[0][2]; - for (int i = 0; i < 6; ++i){ - g_NewDerrick[i][2] = g_NewDerrick[i + 1][2]; - } - g_NewDerrick[6][2] = t; -} - -void CGhostManDlg::rota_F(){ - int t = g_NewDerrick[6][2]; - for (int i = 6; i >= 1; --i){ - g_NewDerrick[i][2] = g_NewDerrick[i - 1][2]; - } - g_NewDerrick[0][2] = t; -} - -void CGhostManDlg::rota_B(){ - int t = g_NewDerrick[0][4]; - for (int i = 0; i < 6; ++i){ - g_NewDerrick[i][4] = g_NewDerrick[i + 1][4]; - } - g_NewDerrick[6][4] = t; -} - -void CGhostManDlg::rota_E(){ - int t = g_NewDerrick[6][4]; - for (int i = 6; i >= 1; --i){ - g_NewDerrick[i][4] = g_NewDerrick[i - 1][4]; - } - g_NewDerrick[0][4] = t; -} - -void CGhostManDlg::rota_C(){ - int t = g_NewDerrick[2][6]; - for (int i = 6; i >= 1; --i){ - g_NewDerrick[2][i] = g_NewDerrick[2][i - 1]; - } - g_NewDerrick[2][0] = t; -} - -void CGhostManDlg::rota_H(){ - int t = g_NewDerrick[2][0]; - for (int i = 0; i < 6; ++i){ - g_NewDerrick[2][i] = g_NewDerrick[2][i + 1]; - } - g_NewDerrick[2][6] = t; -} - -void CGhostManDlg::rota_D(){ - int t = g_NewDerrick[4][6]; - for (int i = 6; i >= 1; --i){ - g_NewDerrick[4][i] = g_NewDerrick[4][i - 1]; - } - g_NewDerrick[4][0] = t; -} - -void CGhostManDlg::rota_G(){ - int t = g_NewDerrick[4][0]; - for (int i = 0; i < 6; ++i){ - g_NewDerrick[4][i] = g_NewDerrick[4][i + 1]; - } - g_NewDerrick[4][6] = t; -} - -int CGhostManDlg::Derrick_h(){ - int a[4] = { 0 }; - for (int i = 2; i <= 4; ++i){ - a[g_NewDerrick[2][i]]++; - } - a[g_NewDerrick[3][2]]++; - a[g_NewDerrick[3][4]]++; - for (int i = 2; i <= 4; ++i){ - a[g_NewDerrick[4][i]]++; - } - sort(a, a + 4); - return 8 - a[3]; -} - -bool CGhostManDlg::Derrick_check(){ - if (g_NewDerrick[2][2] != g_NewDerrick[2][3]) return false; - if (g_NewDerrick[2][3] != g_NewDerrick[2][4]) return false; - if (g_NewDerrick[3][2] != g_NewDerrick[3][4]) return false; - if (g_NewDerrick[4][2] != g_NewDerrick[4][3]) return false; - if (g_NewDerrick[4][3] != g_NewDerrick[4][4]) return false; - if (g_NewDerrick[2][2] != g_NewDerrick[3][2]) return false; - if (g_NewDerrick[3][2] != g_NewDerrick[4][2]) return false; - if (g_NewDerrick[2][3] != g_NewDerrick[4][3]) return false; - if (g_NewDerrick[2][4] != g_NewDerrick[3][4]) return false; - if (g_NewDerrick[3][4] != g_NewDerrick[4][4]) return false; - return true; -} - -bool CGhostManDlg::Derrick_dfs(int d){ - - if (d == limit){ - return Derrick_check(); - } - if (Derrick_h() + d > limit){ - return false; - } - - rota_A(); - ans[d] = 'A'; - if (Derrick_dfs(d + 1)){ - return true; - } - rota_F(); - - rota_B(); - ans[d] = 'B'; - if (Derrick_dfs(d + 1)){ - return true; - } - rota_E(); - - rota_C(); - ans[d] = 'C'; - if (Derrick_dfs(d + 1)){ - return true; - } - rota_H(); - - rota_D(); - ans[d] = 'D'; - if (Derrick_dfs(d + 1)){ - return true; - } - rota_G(); - - rota_E(); - ans[d] = 'E'; - if (Derrick_dfs(d + 1)){ - return true; - } - rota_B(); - - rota_F(); - ans[d] = 'F'; - if (Derrick_dfs(d + 1)){ - return true; - } - rota_A(); - - rota_G(); - ans[d] = 'G'; - if (Derrick_dfs(d + 1)){ - return true; - } - rota_D(); - rota_H(); - ans[d] = 'H'; - if (Derrick_dfs(d + 1)){ - return true; - } - rota_C(); - - return false; -} - -void CGhostManDlg::Derrick_IDAstar(){ - limit = 1; - while (true){ - if (Derrick_dfs(0)){ - break; - } - limit++; - } -} - -DWORD CGhostManDlg::ExpandDerrickIDAFunction(LPARAM lParam) -{ - CGhostManDlg* dlg = (CGhostManDlg*)lParam; - dlg->Derrick_IDAstar(); - dlg->InitDerrick(); - for (int i = 0; i < limit; ++i) - { - switch (ans[i]) - { - case 'A': - { - dlg->rota_A(); - break; - } - case 'B': - { - dlg->rota_B(); - break; - } - case 'C': - { - dlg->rota_C(); - break; - } - case 'D': - { - dlg->rota_D(); - break; - } - case 'E': - { - dlg->rota_E(); - break; - } - case 'F': - { - dlg->rota_F(); - break; - } - case 'G': - { - dlg->rota_G(); - break; - } - case 'H': - { - dlg->rota_H(); - break; - } - } - dlg->DrawCurDerrick(); - Sleep(500); - } - return 0; -} - -double CGhostManDlg::SA_dis(SAPoint a, SAPoint b){ - return sqrt((a.x - b.x) * (a.x - b.x) - + (a.y - b.y) * (a.y - b.y)); -} -double CGhostManDlg::SA_check(SAPoint t){ - double d = INF; - for (int i = 0; i < cnt; ++i){ - d = min(d, SA_dis(t, p[i])); - } - return d; -} - -double CGhostManDlg::SA_Rand(){ - return rand() % (1000 + 1) / (1.0 * 1000.0); -} - -SAPoint CGhostManDlg::SA_gen_p(SAPoint a, SAPoint b){ - SAPoint t = SAPoint(a.x + (b.x - a.x) * SA_Rand(), - a.y + (b.y - a.y) * SA_Rand()); - t.v = SA_check(t); - return t; -} - -void CGhostManDlg::SA(double T){ - for (int i = 0; i < NUM; ++i){ - m[i] = SA_gen_p(e1, e2); - } - - while (T > EPS){ - for (int i = 0; i < NUM; ++i){ - for (int j = 0; j < NUM; ++j){ - SAPoint t = SA_gen_p(SAPoint(max(m[i].x - T, 0.0), max(m[i].y - T, 0.0)), - SAPoint(min(m[i].x + T, x), min(m[i].y + T, y))); - if (t.v > m[i].v){ - m[i] = t; - } - } - } - T *= 0.9; - } - double ans = 0.0; - int id = 0; - for (int i = 0; i < NUM; ++i){ - if (m[i].v > ans){ - ans = m[i].v; - id = i; - } - } - PResult.x = (int)(m[id].y); - PResult.y = (int)(m[id].x); -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan.sln" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan.sln" deleted file mode 100644 index 2b76865..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan.sln" +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GhostMan", "GhostMan\GhostMan.vcxproj", "{F6814BB0-8568-4616-BE8B-561C901E285C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F6814BB0-8568-4616-BE8B-561C901E285C}.Debug|Win32.ActiveCfg = Debug|Win32 - {F6814BB0-8568-4616-BE8B-561C901E285C}.Debug|Win32.Build.0 = Debug|Win32 - {F6814BB0-8568-4616-BE8B-561C901E285C}.Release|Win32.ActiveCfg = Release|Win32 - {F6814BB0-8568-4616-BE8B-561C901E285C}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan.v12.suo" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan.v12.suo" deleted file mode 100644 index 91161e2..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan.v12.suo" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ACOStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/ACOStatic.cpp" deleted file mode 100644 index 715276a..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ACOStatic.cpp" +++ /dev/null @@ -1,86 +0,0 @@ -// ACOStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "ACOStatic.h" - - -// CACOStatic - -IMPLEMENT_DYNAMIC(CACOStatic, CStatic) - -CACOStatic::CACOStatic() -{ - m_nClicked = 0; -} - -CACOStatic::~CACOStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CACOStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CACOStatic Ϣ - - - -void CACOStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CACOStatic::OnMouseLeave() -{ - - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SA_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SA_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SA_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SA_NORMAL)); - SetBitmap(hBmp); - } - - - CStatic::OnMouseLeave(); -} - -void CACOStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SA_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SA_CLICK)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CACOStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ACOStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/ACOStatic.h" deleted file mode 100644 index fa90638..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ACOStatic.h" +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - - -// CACOStatic - -class CACOStatic : public CStatic -{ - DECLARE_DYNAMIC(CACOStatic) - -public: - CACOStatic(); - virtual ~CACOStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - int m_nClicked; - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/AStarStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/AStarStatic.cpp" deleted file mode 100644 index 0365710..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/AStarStatic.cpp" +++ /dev/null @@ -1,88 +0,0 @@ -// AStarStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "AStarStatic.h" - - -// CAStarStatic - -IMPLEMENT_DYNAMIC(CAStarStatic, CStatic) - -CAStarStatic::CAStarStatic() -{ - m_nClicked = 0; -} - -CAStarStatic::~CAStarStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CAStarStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CAStarStatic Ϣ - - - -void CAStarStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CAStarStatic::OnMouseLeave() -{ - - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_ASTAR_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_ASTAR_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_ASTAR_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_ASTAR_NORMAL)); - SetBitmap(hBmp); - } - - - CStatic::OnMouseLeave(); -} - -void CAStarStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_ASTAR_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_ASTAR_CLICK)); - SetBitmap(hBmp); - - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CAStarStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/AStarStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/AStarStatic.h" deleted file mode 100644 index 69f3f1e..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/AStarStatic.h" +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - - -// CAStarStatic - -class CAStarStatic : public CStatic -{ - DECLARE_DYNAMIC(CAStarStatic) - -public: - CAStarStatic(); - virtual ~CAStarStatic(); - -protected: - DECLARE_MESSAGE_MAP() - -public: - int m_nClicked; - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/BFSStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/BFSStatic.cpp" deleted file mode 100644 index 6ecb456..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/BFSStatic.cpp" +++ /dev/null @@ -1,84 +0,0 @@ -// BFSStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "BFSStatic.h" - - -// CBFSStatic - -IMPLEMENT_DYNAMIC(CBFSStatic, CStatic) - -CBFSStatic::CBFSStatic() -{ - m_nClicked = 0; -} - -CBFSStatic::~CBFSStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CBFSStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CBFSStatic Ϣ -void CBFSStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CBFSStatic::OnMouseLeave() -{ - - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_BFS_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_BFS_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_BFS_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_BFS_NORMAL)); - SetBitmap(hBmp); - } - - - CStatic::OnMouseLeave(); -} - -void CBFSStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_BFS_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_BFS_CLICK)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CBFSStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/BFSStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/BFSStatic.h" deleted file mode 100644 index f05ec61..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/BFSStatic.h" +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - - -// CBFSStatic - -class CBFSStatic : public CStatic -{ - DECLARE_DYNAMIC(CBFSStatic) - -public: - CBFSStatic(); - virtual ~CBFSStatic(); - -protected: - DECLARE_MESSAGE_MAP() - -public: - int m_nClicked; - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/CloseStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/CloseStatic.cpp" deleted file mode 100644 index 70ab4bc..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/CloseStatic.cpp" +++ /dev/null @@ -1,79 +0,0 @@ -// CloseStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "CloseStatic.h" - - -// CCloseStatic - -IMPLEMENT_DYNAMIC(CCloseStatic, CStatic) - -CCloseStatic::CCloseStatic() -{ - -} - -CCloseStatic::~CCloseStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CCloseStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CCloseStatic Ϣ - - -void CCloseStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CCloseStatic::OnMouseLeave() -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_CLOSE_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_CLOSE_NORMAL)); - SetBitmap(hBmp); - - CStatic::OnMouseLeave(); -} - - -void CCloseStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_CLOSE_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_CLOSE_HOVER)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - - -BOOL CCloseStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/CloseStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/CloseStatic.h" deleted file mode 100644 index 2ea3921..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/CloseStatic.h" +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - - -// CCloseStatic - -class CCloseStatic : public CStatic -{ - DECLARE_DYNAMIC(CCloseStatic) - -public: - CCloseStatic(); - virtual ~CCloseStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/DFSStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/DFSStatic.cpp" deleted file mode 100644 index 3598848..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/DFSStatic.cpp" +++ /dev/null @@ -1,85 +0,0 @@ -// DFSStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "DFSStatic.h" - - -// CDFSStatic - -IMPLEMENT_DYNAMIC(CDFSStatic, CStatic) - -CDFSStatic::CDFSStatic() -{ - m_nClicked = 0; -} - -CDFSStatic::~CDFSStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CDFSStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CDFSStatic Ϣ - - -void CDFSStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CDFSStatic::OnMouseLeave() -{ - - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_DFS_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_DFS_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_DFS_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_DFS_NORMAL)); - SetBitmap(hBmp); - } - - - CStatic::OnMouseLeave(); -} - -void CDFSStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_DFS_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_DFS_CLICK)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CDFSStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/DFSStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/DFSStatic.h" deleted file mode 100644 index 2b2adce..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/DFSStatic.h" +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - - -// CDFSStatic - -class CDFSStatic : public CStatic -{ - DECLARE_DYNAMIC(CDFSStatic) - -public: - CDFSStatic(); - virtual ~CDFSStatic(); - -protected: - DECLARE_MESSAGE_MAP() - -public: - int m_nClicked; - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/DynamicStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/DynamicStatic.cpp" deleted file mode 100644 index a0a1082..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/DynamicStatic.cpp" +++ /dev/null @@ -1,76 +0,0 @@ -// DynamicStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "DynamicStatic.h" - - -// CDynamicStatic - -IMPLEMENT_DYNAMIC(CDynamicStatic, CStatic) - -CDynamicStatic::CDynamicStatic() -{ - -} - -CDynamicStatic::~CDynamicStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CDynamicStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CDynamicStatic Ϣ - -void CDynamicStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CDynamicStatic::OnMouseLeave() -{ - - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_DYNAMIC_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_DYNAMIC_NORMAL)); - SetBitmap(hBmp); - - CStatic::OnMouseLeave(); -} - -void CDynamicStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_DYNAMIC_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_DYNAMIC_HOVER)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CDynamicStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/DynamicStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/DynamicStatic.h" deleted file mode 100644 index 77003e7..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/DynamicStatic.h" +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - - -// CDynamicStatic - -class CDynamicStatic : public CStatic -{ - DECLARE_DYNAMIC(CDynamicStatic) - -public: - CDynamicStatic(); - virtual ~CDynamicStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ExecStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/ExecStatic.cpp" deleted file mode 100644 index bfc7fa3..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ExecStatic.cpp" +++ /dev/null @@ -1,77 +0,0 @@ -// ExecStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "ExecStatic.h" - - -// CExecStatic - -IMPLEMENT_DYNAMIC(CExecStatic, CStatic) - -CExecStatic::CExecStatic() -{ - -} - -CExecStatic::~CExecStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CExecStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CExecStatic Ϣ - - - -void CExecStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CExecStatic::OnMouseLeave() -{ - - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_EXEC_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_EXEC_NORMAL)); - SetBitmap(hBmp); - - CStatic::OnMouseLeave(); -} - -void CExecStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_EXEC_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_EXEC_HOVER)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CExecStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ExecStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/ExecStatic.h" deleted file mode 100644 index 6862294..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ExecStatic.h" +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - - -// CExecStatic - -class CExecStatic : public CStatic -{ - DECLARE_DYNAMIC(CExecStatic) - -public: - CExecStatic(); - virtual ~CExecStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.aps" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.aps" deleted file mode 100644 index 60d3859..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.aps" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.cpp" deleted file mode 100644 index 5612a85..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.cpp" +++ /dev/null @@ -1,101 +0,0 @@ - -// GhostMan.cpp : ӦóΪ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "GhostManDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#endif - - -// CGhostManApp - -BEGIN_MESSAGE_MAP(CGhostManApp, CWinApp) - ON_COMMAND(ID_HELP, &CWinApp::OnHelp) -END_MESSAGE_MAP() - - -// CGhostManApp - -CGhostManApp::CGhostManApp() -{ - // ֧ - m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART; - - // TODO: ڴ˴ӹ룬 - // Ҫijʼ InitInstance -} - - -// Ψһһ CGhostManApp - -CGhostManApp theApp; - -// CGhostManApp ʼ - -BOOL CGhostManApp::InitInstance() -{ - // һ Windows XP ϵӦó嵥ָҪ - // ʹ ComCtl32.dll 汾 6 ߰汾ÿӻʽ - //Ҫ InitCommonControlsEx() 򣬽޷ڡ - INITCOMMONCONTROLSEX InitCtrls; - InitCtrls.dwSize = sizeof(InitCtrls); - // ΪҪӦóʹõ - // ؼࡣ - InitCtrls.dwICC = ICC_WIN95_CLASSES; - InitCommonControlsEx(&InitCtrls); - - CWinApp::InitInstance(); - - - AfxEnableControlContainer(); - - // shell ԷԻ - // κ shell ͼؼ shell бͼؼ - CShellManager *pShellManager = new CShellManager; - - // Windows NativeӾԱ MFC ؼ - CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows)); - - // ׼ʼ - // δʹЩܲϣС - // տִļĴСӦƳ - // Ҫضʼ - // ڴ洢õע - // TODO: Ӧʵ޸ĸַ - // ޸Ϊ˾֯ - SetRegistryKey(_T("ӦóɵıӦó")); - - CGhostManDlg dlg; - m_pMainWnd = &dlg; - INT_PTR nResponse = dlg.DoModal(); - if (nResponse == IDOK) - { - // TODO: ڴ˷ôʱ - // ȷرնԻĴ - } - else if (nResponse == IDCANCEL) - { - // TODO: ڴ˷ôʱ - // ȡرնԻĴ - } - else if (nResponse == -1) - { - TRACE(traceAppMsg, 0, ": Ի򴴽ʧܣӦóֹ\n"); - TRACE(traceAppMsg, 0, ": ڶԻʹ MFC ؼ޷ #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS\n"); - } - - // ɾ洴 shell - if (pShellManager != NULL) - { - delete pShellManager; - } - - // ڶԻѹرգԽ FALSE Ա˳Ӧó - // ӦóϢá - return FALSE; -} - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.h" deleted file mode 100644 index 43f0f98..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.h" +++ /dev/null @@ -1,32 +0,0 @@ - -// GhostMan.h : PROJECT_NAME Ӧóͷļ -// - -#pragma once - -#ifndef __AFXWIN_H__ - #error "ڰļ֮ǰstdafx.h PCH ļ" -#endif - -#include "resource.h" // - - -// CGhostManApp: -// йشʵ֣ GhostMan.cpp -// - -class CGhostManApp : public CWinApp -{ -public: - CGhostManApp(); - -// д -public: - virtual BOOL InitInstance(); - -// ʵ - - DECLARE_MESSAGE_MAP() -}; - -extern CGhostManApp theApp; \ No newline at end of file diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.rc" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.rc" deleted file mode 100644 index 77f406b..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.rc" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj.filters" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj.filters" deleted file mode 100644 index e25d26d..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj.filters" +++ /dev/null @@ -1,411 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {622027f0-8dd5-442c-9804-b0d5aa21f299} - - - {bd0e63cf-fc63-4b9b-acc7-0610e53cac69} - - - {80cf93a2-c3be-4ac3-ad1f-e4f619d3680a} - - - - - - - - 头文件 - - - 头文件 - - - 头文件 - - - 对话框:主对话框 - - - 对话框:主对话框 - - - MyStatic - - - MyStatic - - - MyText - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - - - 源文件 - - - 对话框:主对话框 - - - 对话框:主对话框 - - - MyStatic - - - MyStatic - - - MyText - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - MyStatic - - - - - 资源文件 - - - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - 资源文件 - - - - - 资源文件 - - - \ No newline at end of file diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostManDlg.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostManDlg.h" deleted file mode 100644 index f9380a0..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostManDlg.h" +++ /dev/null @@ -1,306 +0,0 @@ - -// GhostManDlg.h : ͷļ -// - -#pragma once -#include "SetStartStatic.h" -#include "SetEndStatic.h" -#include "MyText.h" -#include "MinStatic.h" -#include "CloseStatic.h" -#include "AStarStatic.h" -#include "BFSStatic.h" -#include "DFSStatic.h" -#include "IDAStarStatic.h" -#include "ACOStatic.h" -#include "InitStatic.h" -#include "ExecStatic.h" -#include "StepStatic.h" -#include "DynamicStatic.h" -#include "STStatic.h" -#include "MyStatic.h" -#include "afxwin.h" -#include - -#define MAXX 20 //ͼ߶ -#define MAXY 40 //ͼ -#define wall -1 //ǽ -#define grass 4 //ݵ -#define swamp 3 // -#define water 2 //ˮ -#define road 1 //½ -#define visited 5 //·ʹ - -#define IDT_DELAY_DRAWGRID 0x1001 -#define IDT_DELAY_CLOSEGRID 0x1002 -#define IDT_DELAY_DRAWIDAPANDA 0x1003 -#define IDT_DELAY_DRAWIDAGRID 0x1004 -#define IDT_DELAY_REPAINT 0x1005 -#define IDT_DELAY_FLICKER 0x1006 - - -#define WM_REPAINT_GRID WM_USER+1 -#define WM_PAINT_PANDA WM_USER+2 - -#define clr( a, b ) memset( a, b, sizeof(a) ) - -#define NUM 20 - -struct Point{ - int x, y; - unsigned long long time; - int pre_x, pre_y; - int deep; - int h, g, f; - Point(){ }; - Point(int _x, int _y, long long _time, int _deep){ - x = _x; - y = _y; - time = _time; - deep = _deep; - } - bool operator < (const Point b) const { - if (f == b.f){ - return deep > b.deep; - } - else{ - return f > b.f; - } - //return f > b.f; - } -}; - -struct SAPoint{ - double x, y, v; - SAPoint() {}; - SAPoint(double _x, double _y) : x(_x), y(_y) { }; -}; - -//ҪͼϢ -struct IDA_S{ - int maze[3][3]; - int x, y; - int step, pre; - int h; -}; - -// CGhostManDlg Ի -class CGhostManDlg : public CDialogEx -{ -// -public: - CGhostManDlg(CWnd* pParent = NULL); // ׼캯 - -// Ի - enum { IDD = IDD_GHOSTMAN_DIALOG }; - - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧ - - -// ʵ -protected: - HICON m_hIcon; - - // ɵϢӳ亯 - virtual BOOL OnInitDialog(); - afx_msg void OnSysCommand(UINT nID, LPARAM lParam); - afx_msg void OnPaint(); - afx_msg HCURSOR OnQueryDragIcon(); - DECLARE_MESSAGE_MAP() -public: - afx_msg void OnMenuExit(); - - int m_nWidth; //һĿ - int m_nHeight; //һĸ߶ - - int m_nStartX; //ĿؼX - int m_nStartY; //ĿؼY - - BOOL m_bSetStart; //ǷҪ - BOOL m_bSetEnd; //ǷҪյ - - BOOL m_bHaveAStart; //ǷѾһ - BOOL m_bHaveAEnd; //ǷѾһյ - - BOOL m_bInternalShow; //Ƿִ̬ - - BOOL m_bFirstStep; //Ƿһν뵥 - BOOL m_bByStep; //ִָеԶִ - BOOL m_bClickStep; //Ƿ˵ִаť - - BOOL m_bHaveARoad; //ǷѾҵһ· - - BOOL m_bleftButtonDown; - BOOL m_bInitGhostMan; - BOOL m_bNeedRepaint; - - BOOL m_bInitSquared; - - CPoint m_mousePoint; - - int m_nAvailableStartX; //X - int m_nAvailableStartY; //Y - - int m_nAvailableEndX; //յX - int m_nAvailableEndY; //յY - - int m_nAlgorithmIndex; - int m_nExeCount; - - int m_nCurPandaIndex; - - int m_nFlickerIndex; - int m_nFlickerTimer; - BOOL m_bHaveAResult; - - CSetStartStatic m_btnSetStart; - CSetEndStatic m_btnSetEnd; - - CMinStatic m_btnMin; - CCloseStatic m_btnClose; - CAStarStatic m_btnAStar; - CBFSStatic m_btnBFS; - CDFSStatic m_btnDFS; - CIDAStarStatic m_btnIDAStar; - CACOStatic m_btnSA; - CInitStatic m_btnInit; - CExecStatic m_btnExec; - CStepStatic m_btnStep; - CDynamicStatic m_btnDynamic; - CSTStatic m_btnST; - - CBitmap m_BitMap; - CDC m_Dc; - CDC m_GridDc; - - int m_nOriGridBottom; - int m_nOriGridTop; - int m_nOriGridLeft; - int m_nOriGridRight; - - int m_nCurGridLeft; - int m_nCurGridBottom; - int m_nCurGridTop; - int m_nCurGridRight; - - int m_nIDAGridStartX; - int m_nIDAGridStartY; - - int m_nIDACurGridX; - int m_nIDACurGridY; - - int m_nHidedPandaIndex; - - - CRect m_rcPanda[9]; - void CGhostManDlg::DrawGrid(); - void CGhostManDlg::DrawAColor(int nx, int ny, COLORREF color); - void CGhostManDlg::DrawCurMazeColor(); - void CGhostManDlg::DrawInitMazeColor(); - void CGhostManDlg::DrawInitDerrick(); - void CGhostManDlg::DrawCurDerrick(); - void CGhostManDlg::DrawInitSAMaze(); - void CGhostManDlg::DrawNewSAMaze(); - bool CGhostManDlg::BFS(); - bool CGhostManDlg::DFS(); - bool CGhostManDlg::ExDFS(); - bool CGhostManDlg::ExBFS(); - bool CGhostManDlg::Check(int x, int y); - bool CGhostManDlg::IDA_check(IDA_S s); - void CGhostManDlg::Get_Path(); - int CGhostManDlg::h(Point p); - int CGhostManDlg::IDA_h(IDA_S s); - bool CGhostManDlg::Astar(); - bool CGhostManDlg::ExAstar(); - bool CGhostManDlg::IDA_star(IDA_S s); - int CGhostManDlg::IDA_dfs(IDA_S s); - - void CGhostManDlg::rota_A(); - void CGhostManDlg::rota_F(); - void CGhostManDlg::rota_B(); - void CGhostManDlg::rota_E(); - void CGhostManDlg::rota_C(); - void CGhostManDlg::rota_H(); - void CGhostManDlg::rota_D(); - void CGhostManDlg::rota_G(); - void CGhostManDlg::Derrick_IDAstar(); - int CGhostManDlg::Derrick_h(); - bool CGhostManDlg::Derrick_check(); - bool CGhostManDlg::Derrick_dfs(int d); - void CGhostManDlg::InitDerrick(); - - double CGhostManDlg::SA_Rand(); - SAPoint CGhostManDlg::SA_gen_p(SAPoint a, SAPoint b); - void CGhostManDlg::SA(double T); - double CGhostManDlg::SA_dis(SAPoint a, SAPoint b); - double CGhostManDlg::SA_check(SAPoint t); - - void CGhostManDlg::InitDC(); - void CGhostManDlg::DrawDC(); - void CGhostManDlg::Final_BFS(); - void CGhostManDlg::Final_DFS(); - void CGhostManDlg::Final_ASTAR(); - void CGhostManDlg::Final_IDAStar(); - void CGhostManDlg::Final_SA(); - - void CGhostManDlg::RandIDAGrid(); //ܱȽϺʱ - bool CGhostManDlg::CheckNum(int nNum, int nIndex); - - - CPoint CGhostManDlg::GetMazeCenter(int x, int y); //õͼһ - - void CGhostManDlg::MovePandaToZero(); - void CGhostManDlg::MovePandaToInit(); - - void CGhostManDlg::InitStatus(); //ʼ״̬ - void CGhostManDlg::InitBFStatus(); //ʼBFS㷨״̬ - void CGhostManDlg::InitDFStatus(); - void CGhostManDlg::InitAstartatus(); - void CGhostManDlg::InitIDAstarstatus(); - - void CGhostManDlg::ClearAlgorithmCursor(); - - static DWORD CGhostManDlg::RandIDAGridFunction(LPARAM lParam); - static DWORD CGhostManDlg::ExpandBFSFunction(LPARAM lParam); - static DWORD CGhostManDlg::ExpandAstarFunction(LPARAM lParam); - static DWORD CGhostManDlg::ExpandDFSFunction(LPARAM lParam); - static DWORD CGhostManDlg::ExpandIDAStarFunction(LPARAM lParam); - static DWORD CGhostManDlg::ExpandDerrickIDAFunction(LPARAM lParam); - - LRESULT OnRepaintGrid(WPARAM wParam, LPARAM lParam); - LRESULT OnPaintPanda(WPARAM wParam, LPARAM lParam); - - afx_msg void OnLButtonDown(UINT nFlags, CPoint point); - afx_msg void OnStnClickedStaticSetstart(); - afx_msg void OnStnClickedStaticSetend(); - afx_msg void OnTimer(UINT_PTR nIDEvent); - afx_msg void OnLButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - - afx_msg void OnStnClickedStaticClose(); - afx_msg void OnStnClickedStaticMin(); - afx_msg void OnStnClickedStaticMax(); - afx_msg void OnStnClickedStaticAstar(); - afx_msg void OnStnClickedStaticDynamic(); - afx_msg void OnStnClickedStaticInit(); - afx_msg void OnStnClickedStaticExec(); - afx_msg void OnStnClickedStaticStep(); - afx_msg void OnStnClickedStaticStatic(); - afx_msg void OnStnClickedStaticBfs(); - afx_msg void OnStnClickedStaticDfs(); - afx_msg void OnStnClickedStaticIdastar(); - afx_msg void OnStnClickedStaticSA(); - afx_msg void OnMove(int x, int y); - afx_msg BOOL OnEraseBkgnd(CDC* pDC); - CStatic m_btnPanda1; - CStatic m_btnPanda2; - CStatic m_btnPanda3; - CStatic m_btnPanda4; - CStatic m_btnPanda5; - CStatic m_btnPanda6; - CStatic m_btnPanda7; - CStatic m_btnPanda8; - CStatic m_btnPanda9; -}; diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/IDAStarStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/IDAStarStatic.cpp" deleted file mode 100644 index 96c3130..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/IDAStarStatic.cpp" +++ /dev/null @@ -1,85 +0,0 @@ -// IDAStarStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "IDAStarStatic.h" - - -// CIDAStarStatic - -IMPLEMENT_DYNAMIC(CIDAStarStatic, CStatic) - -CIDAStarStatic::CIDAStarStatic() -{ - m_nClicked = 0; -} - -CIDAStarStatic::~CIDAStarStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CIDAStarStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CIDAStarStatic Ϣ - - -void CIDAStarStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CIDAStarStatic::OnMouseLeave() -{ - - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_NORMAL)); - SetBitmap(hBmp); - } - - - CStatic::OnMouseLeave(); -} - -void CIDAStarStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_IDASTAR_CLICK)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CIDAStarStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/IDAStarStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/IDAStarStatic.h" deleted file mode 100644 index 6d33f4e..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/IDAStarStatic.h" +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - - -// CIDAStarStatic - -class CIDAStarStatic : public CStatic -{ - DECLARE_DYNAMIC(CIDAStarStatic) - -public: - CIDAStarStatic(); - virtual ~CIDAStarStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - int m_nClicked; - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/InitStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/InitStatic.cpp" deleted file mode 100644 index b1ced20..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/InitStatic.cpp" +++ /dev/null @@ -1,80 +0,0 @@ -// InitStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "InitStatic.h" - - -// CInitStatic - -IMPLEMENT_DYNAMIC(CInitStatic, CStatic) - -CInitStatic::CInitStatic() -{ - -} - -CInitStatic::~CInitStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CInitStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CInitStatic Ϣ - - - -void CInitStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CInitStatic::OnMouseLeave() -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_INIT_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_INIT_NORMAL)); - SetBitmap(hBmp); - - CStatic::OnMouseLeave(); -} - - -void CInitStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_INIT_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_INIT_HOVER)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - - -BOOL CInitStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/InitStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/InitStatic.h" deleted file mode 100644 index 694d146..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/InitStatic.h" +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - - -// CInitStatic - -class CInitStatic : public CStatic -{ - DECLARE_DYNAMIC(CInitStatic) - -public: - CInitStatic(); - virtual ~CInitStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MinStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/MinStatic.cpp" deleted file mode 100644 index aef3e22..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MinStatic.cpp" +++ /dev/null @@ -1,79 +0,0 @@ -// MinStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "MinStatic.h" - - -// CMinStatic - -IMPLEMENT_DYNAMIC(CMinStatic, CStatic) - -CMinStatic::CMinStatic() -{ - -} - -CMinStatic::~CMinStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CMinStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CMinStatic Ϣ - - -void CMinStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CMinStatic::OnMouseLeave() -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_MIN_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_MIN_NORMAL)); - SetBitmap(hBmp); - - CStatic::OnMouseLeave(); -} - - -void CMinStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_MIN_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_MIN_HOVER)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - - -BOOL CMinStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MinStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/MinStatic.h" deleted file mode 100644 index e88e4a1..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MinStatic.h" +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - - -// CMinStatic - -class CMinStatic : public CStatic -{ - DECLARE_DYNAMIC(CMinStatic) - -public: - CMinStatic(); - virtual ~CMinStatic(); - -protected: - DECLARE_MESSAGE_MAP() - -public: - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyStatic.cpp" deleted file mode 100644 index f64e8bf..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyStatic.cpp" +++ /dev/null @@ -1,41 +0,0 @@ -// MyStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "MyStatic.h" - - -// CMyStatic - -IMPLEMENT_DYNAMIC(CMyStatic, CStatic) - -CMyStatic::CMyStatic() -{ - -} - -CMyStatic::~CMyStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CMyStatic, CStatic) - ON_WM_PAINT() -END_MESSAGE_MAP() - - - -// CMyStatic Ϣ - - - - -void CMyStatic::OnPaint() -{ - CPaintDC dc(this); // device context for painting - // TODO: ڴ˴Ϣ - // ΪͼϢ CStatic::OnPaint() - -// UpdateWindow(); -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyStatic.h" deleted file mode 100644 index 920f700..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyStatic.h" +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - - -// CMyStatic - -class CMyStatic : public CStatic -{ - DECLARE_DYNAMIC(CMyStatic) - -public: - CMyStatic(); - virtual ~CMyStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - afx_msg void OnPaint(); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyText.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyText.cpp" deleted file mode 100644 index 3417e04..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyText.cpp" +++ /dev/null @@ -1,61 +0,0 @@ -// MyText.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "MyText.h" - - -// CMyText - -IMPLEMENT_DYNAMIC(CMyText, CStatic) - -CMyText::CMyText() -{ - -} - -CMyText::~CMyText() -{ -} - - -BEGIN_MESSAGE_MAP(CMyText, CStatic) - ON_WM_CTLCOLOR_REFLECT() -END_MESSAGE_MAP() - - - -// CMyText Ϣ - -HBRUSH CMyText::CtlColor(CDC* pDC, UINT /*nCtlColor*/) -{ - // TODO: ڴ˸ DC κ - - // TODO: ӦøĴ򷵻ط null - pDC->SetBkMode(TRANSPARENT); - pDC->SetTextColor(RGB(75, 75, 75)); - - return (HBRUSH) ::GetStockObject(NULL_BRUSH); - -} - -LRESULT CMyText::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) -{ - // TODO: ڴרô/û - -/* if (message == WM_SETTEXT) - { - CRect rect; - GetWindowRect(&rect); - CWnd* pParent = GetParent(); - - if (pParent) - { - pParent->ScreenToClient(&rect); - pParent->InvalidateRect(&rect); - } - }*/ - - return CStatic::DefWindowProc(message, wParam, lParam); -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyText.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyText.h" deleted file mode 100644 index 0b84577..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/MyText.h" +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - - -// CMyText - -class CMyText : public CStatic -{ - DECLARE_DYNAMIC(CMyText) - -public: - CMyText(); - virtual ~CMyText(); - -protected: - DECLARE_MESSAGE_MAP() -public: - afx_msg HBRUSH CtlColor(CDC* /*pDC*/, UINT /*nCtlColor*/); - virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ReadMe.txt" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/ReadMe.txt" deleted file mode 100644 index 369e4a4..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/ReadMe.txt" +++ /dev/null @@ -1,70 +0,0 @@ -================================================================================ - MICROSOFT 基础类库 : GhostMan 项目概述 -=============================================================================== - -应用程序向导已为您创建了此 GhostMan 应用程序。此应用程序不仅演示 Microsoft 基础类的基本使用方法,还可作为您编写应用程序的起点。 - -本文件概要介绍组成 GhostMan 应用程序的每个文件的内容。 - -GhostMan.vcxproj - 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 - -GhostMan.vcxproj.filters - 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 - -GhostMan.h - 这是应用程序的主头文件。 - 其中包括其他项目特定的标头(包括 Resource.h),并声明 CGhostManApp 应用程序类。 - -GhostMan.cpp - 这是包含应用程序类 CGhostManApp 的主应用程序源文件。 - -GhostMan.rc - 这是程序使用的所有 Microsoft Windows 资源的列表。它包括 RES 子目录中存储的图标、位图和光标。此文件可以直接在 Microsoft Visual C++ 中进行编辑。项目资源包含在 2052 中。 - -res\GhostMan.ico - 这是用作应用程序图标的图标文件。此图标包括在主资源文件 GhostMan.rc 中。 - -res\GhostMan.rc2 - 此文件包含不在 Microsoft Visual C++ 中进行编辑的资源。您应该将不可由资源编辑器编辑的所有资源放在此文件中。 - - -///////////////////////////////////////////////////////////////////////////// - -应用程序向导创建一个对话框类: - -GhostManDlg.h、GhostManDlg.cpp - 对话框 - 这些文件包含 CGhostManDlg 类。此类定义应用程序的主对话框的行为。对话框模板包含在 GhostMan.rc 中,该文件可以在 Microsoft Visual C++ 中编辑。 - -///////////////////////////////////////////////////////////////////////////// - -其他功能: - -ActiveX 控件 - 该应用程序包含对使用 ActiveX 控件的支持。 - -打印和打印预览支持 - 应用程序向导通过从 MFC 库调用 CView 类中的成员函数生成代码,来处理打印、打印设置和打印预览命令。 - -///////////////////////////////////////////////////////////////////////////// - -其他标准文件: - -StdAfx.h, StdAfx.cpp - 这些文件用于生成名为 GhostMan.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 - -Resource.h - 这是标准头文件,可用于定义新的资源 ID。Microsoft Visual C++ 将读取并更新此文件。 - -GhostMan.manifest - Windows XP 使用应用程序清单文件来描述特定版本的并行程序集的应用程序依赖项。加载程序使用这些信息来从程序集缓存中加载相应的程序集,并保护其不被应用程序访问。应用程序清单可能会包含在内,以作为与应用程序可执行文件安装在同一文件夹中的外部 .manifest 文件进行重新分发,它还可能以资源的形式包含在可执行文件中。 -///////////////////////////////////////////////////////////////////////////// - -其他注释: - -应用程序向导使用“TODO:”来指示应添加或自定义的源代码部分。 - -如果应用程序使用共享 DLL 中的 MFC,您将需要重新分发 MFC DLL。如果应用程序所使用的语言与操作系统的区域设置不同,则还需要重新分发相应的本地化资源 mfc110XXX.DLL。 -有关上述话题的更多信息,请参见 MSDN 文档中有关重新分发 Visual C++ 应用程序的部分。 - -///////////////////////////////////////////////////////////////////////////// diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/STStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/STStatic.cpp" deleted file mode 100644 index bbbe42a..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/STStatic.cpp" +++ /dev/null @@ -1,77 +0,0 @@ -// STStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "STStatic.h" - - -// CSTStatic - -IMPLEMENT_DYNAMIC(CSTStatic, CStatic) - -CSTStatic::CSTStatic() -{ - -} - -CSTStatic::~CSTStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CSTStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CSTStatic Ϣ - - - -void CSTStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CSTStatic::OnMouseLeave() -{ - - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_STATIC_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_STATIC_NORMAL)); - SetBitmap(hBmp); - - CStatic::OnMouseLeave(); -} - -void CSTStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_STATIC_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_STATIC_HOVER)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CSTStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/STStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/STStatic.h" deleted file mode 100644 index f4ed174..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/STStatic.h" +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - - -// CSTStatic - -class CSTStatic : public CStatic -{ - DECLARE_DYNAMIC(CSTStatic) - -public: - CSTStatic(); - virtual ~CSTStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetEndStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetEndStatic.cpp" deleted file mode 100644 index e2f5caf..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetEndStatic.cpp" +++ /dev/null @@ -1,93 +0,0 @@ -// SetEndStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "SetEndStatic.h" - - -// CSetEndStatic - -IMPLEMENT_DYNAMIC(CSetEndStatic, CStatic) - -CSetEndStatic::CSetEndStatic() -{ - m_nClicked = 0; -} - -CSetEndStatic::~CSetEndStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CSetEndStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CSetEndStatic Ϣ - -void CSetEndStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CSetEndStatic::OnMouseLeave() -{ - // TODO: ڴϢ/Ĭֵ - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETEND_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETEND_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETEND_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETEND_NORMAL)); - SetBitmap(hBmp); - } - - CStatic::OnMouseLeave(); -} - - -void CSetEndStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETEND_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETEND_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETEND_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETEND_HOVER)); - SetBitmap(hBmp); - } - - CStatic::OnMouseHover(nFlags, point); -} - - -BOOL CSetEndStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetEndStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetEndStatic.h" deleted file mode 100644 index cca7b6c..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetEndStatic.h" +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - - -// CSetEndStatic - -class CSetEndStatic : public CStatic -{ - DECLARE_DYNAMIC(CSetEndStatic) - -public: - CSetEndStatic(); - virtual ~CSetEndStatic(); - -protected: - DECLARE_MESSAGE_MAP() - -public: - int m_nClicked; - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetStartStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetStartStatic.cpp" deleted file mode 100644 index 3d2ca9c..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetStartStatic.cpp" +++ /dev/null @@ -1,97 +0,0 @@ -// SetStartStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "SetStartStatic.h" - - -// CSetStartStatic - -IMPLEMENT_DYNAMIC(CSetStartStatic, CStatic) - -CSetStartStatic::CSetStartStatic() -{ - m_nClicked = 0; -} - -CSetStartStatic::~CSetStartStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CSetStartStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CSetStartStatic Ϣ - -void CSetStartStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CSetStartStatic::OnMouseLeave() -{ - // TODO: ڴϢ/Ĭֵ - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETSTART_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETSTART_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETSTART_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETSTART_NORMAL)); - SetBitmap(hBmp); - } - - - CStatic::OnMouseLeave(); -} - - -void CSetStartStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - if (m_nClicked) - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETSTART_CLICK), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETSTART_CLICK)); - SetBitmap(hBmp); - } - else - { - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_SETSTART_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_SETSTART_HOVER)); - SetBitmap(hBmp); - } - - - CStatic::OnMouseHover(nFlags, point); -} - - -BOOL CSetStartStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetStartStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetStartStatic.h" deleted file mode 100644 index c84e365..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/SetStartStatic.h" +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - - -// CSetStartStatic - -class CSetStartStatic : public CStatic -{ - DECLARE_DYNAMIC(CSetStartStatic) - -public: - CSetStartStatic(); - virtual ~CSetStartStatic(); - -protected: - DECLARE_MESSAGE_MAP() - -public: - int m_nClicked; - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/StepStatic.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/StepStatic.cpp" deleted file mode 100644 index 4cb6eb1..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/StepStatic.cpp" +++ /dev/null @@ -1,75 +0,0 @@ -// StepStatic.cpp : ʵļ -// - -#include "stdafx.h" -#include "GhostMan.h" -#include "StepStatic.h" - - -// CStepStatic - -IMPLEMENT_DYNAMIC(CStepStatic, CStatic) - -CStepStatic::CStepStatic() -{ - -} - -CStepStatic::~CStepStatic() -{ -} - - -BEGIN_MESSAGE_MAP(CStepStatic, CStatic) - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_MOUSEHOVER() - ON_WM_SETCURSOR() -END_MESSAGE_MAP() - - - -// CStepStatic Ϣ - -void CStepStatic::OnMouseMove(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - TRACKMOUSEEVENT csTME; - csTME.cbSize = sizeof(csTME); - csTME.dwFlags = TME_LEAVE | TME_HOVER; - csTME.hwndTrack = m_hWnd; // ָҪ ׷ Ĵ - csTME.dwHoverTime = 10; // ڰťͣ 10ms Ϊ״̬Ϊ HOVER - ::_TrackMouseEvent(&csTME); // Windows WM_MOUSELEAVE WM_MOUSEHOVER ¼֧ - // CStatic::OnMouseMove(nFlags, point); -} - - -void CStepStatic::OnMouseLeave() -{ - - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_STEP_NORMAL), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_STEP_NORMAL)); - SetBitmap(hBmp); - - CStatic::OnMouseLeave(); -} - -void CStepStatic::OnMouseHover(UINT nFlags, CPoint point) -{ - // TODO: ڴϢ/Ĭֵ - - HINSTANCE hIns = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAP_STEP_HOVER), RT_GROUP_ICON); - HBITMAP hBmp = ::LoadBitmap(hIns, MAKEINTRESOURCE(IDB_BITMAP_STEP_HOVER)); - SetBitmap(hBmp); - - CStatic::OnMouseHover(nFlags, point); -} - -BOOL CStepStatic::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) -{ - // TODO: ڴϢ/Ĭֵ - // ʹԼƺ - ::SetCursor(::LoadCursorW(NULL, IDC_HAND)); - return TRUE; -} diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/StepStatic.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/StepStatic.h" deleted file mode 100644 index 40b708d..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/StepStatic.h" +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - - -// CStepStatic - -class CStepStatic : public CStatic -{ - DECLARE_DYNAMIC(CStepStatic) - -public: - CStepStatic(); - virtual ~CStepStatic(); - -protected: - DECLARE_MESSAGE_MAP() -public: - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnMouseHover(UINT nFlags, CPoint point); - afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); -}; - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/AStar_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/AStar_hover.bmp" deleted file mode 100644 index 3ebd549..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/AStar_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/Astar_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/Astar_normal.bmp" deleted file mode 100644 index dafd4fe..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/Astar_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/GhostMan.rc2" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/GhostMan.rc2" deleted file mode 100644 index b36e010..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/GhostMan.rc2" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bfs_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bfs_hover.bmp" deleted file mode 100644 index e6589ba..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bfs_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bfs_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bfs_normal.bmp" deleted file mode 100644 index b3a745c..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bfs_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bg_global.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bg_global.bmp" deleted file mode 100644 index e56dea5..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/bg_global.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_down.bmp" deleted file mode 100644 index 5455423..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_hover.bmp" deleted file mode 100644 index 21e00d0..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_normal.bmp" deleted file mode 100644 index 55d6e3b..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/close_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dfs_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dfs_hover.bmp" deleted file mode 100644 index e8701ed..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dfs_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dfs_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dfs_normal.bmp" deleted file mode 100644 index 5e088a2..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dfs_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_down.bmp" deleted file mode 100644 index 00b3fa4..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_hover.bmp" deleted file mode 100644 index 3323871..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_normal.bmp" deleted file mode 100644 index 228e4e3..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/dynamic_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_down.bmp" deleted file mode 100644 index e5925b9..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_hover.bmp" deleted file mode 100644 index c639ae0..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_normal.bmp" deleted file mode 100644 index 985c93e..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/end_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_down.bmp" deleted file mode 100644 index fa8fa0c..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_hover.bmp" deleted file mode 100644 index 57599b3..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_normal.bmp" deleted file mode 100644 index 18a4012..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/exec_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/header.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/header.bmp" deleted file mode 100644 index 0282163..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/header.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/hover.bmp" deleted file mode 100644 index fb92984..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/idastar_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/idastar_hover.bmp" deleted file mode 100644 index 14080b6..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/idastar_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/idastar_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/idastar_normal.bmp" deleted file mode 100644 index ecb08ea..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/idastar_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_down.bmp" deleted file mode 100644 index b5b93a5..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_hover.bmp" deleted file mode 100644 index 65375a0..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_normal.bmp" deleted file mode 100644 index f749f42..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/init_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_01.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_01.bmp" deleted file mode 100644 index 13936b0..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_01.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_02.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_02.bmp" deleted file mode 100644 index 12d6d4d..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_02.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_03.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_03.bmp" deleted file mode 100644 index 818d771..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_03.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_04.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_04.bmp" deleted file mode 100644 index 64bc126..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_04.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_05.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_05.bmp" deleted file mode 100644 index dae9a92..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_05.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_06.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_06.bmp" deleted file mode 100644 index 5b0d56a..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_06.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_07.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_07.bmp" deleted file mode 100644 index 456e3ce..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_07.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_08.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_08.bmp" deleted file mode 100644 index 638eab8..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_08.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_09.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_09.bmp" deleted file mode 100644 index ff50856..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/kungfu-panda_09.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo.bmp" deleted file mode 100644 index c738e30..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo.ico" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo.ico" deleted file mode 100644 index 9f60f23..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo.ico" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo_main.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo_main.bmp" deleted file mode 100644 index ffce43e..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/logo_main.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/map_introduction.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/map_introduction.bmp" deleted file mode 100644 index 4eea947..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/map_introduction.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_down.bmp" deleted file mode 100644 index ad4f3b5..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_hover.bmp" deleted file mode 100644 index f4bd755..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_normal.bmp" deleted file mode 100644 index 28a0c5a..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/max_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_down.bmp" deleted file mode 100644 index 07b55c4..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_hover.bmp" deleted file mode 100644 index 393d4f1..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_normal.bmp" deleted file mode 100644 index 7ec1153..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/min_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/normal.bmp" deleted file mode 100644 index d26411b..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_down.bmp" deleted file mode 100644 index b40175c..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_hover.bmp" deleted file mode 100644 index 6316237..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_normal.bmp" deleted file mode 100644 index 2bc81ee..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/start_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_down.bmp" deleted file mode 100644 index 0a27a51..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_hover.bmp" deleted file mode 100644 index bfc3708..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_normal.bmp" deleted file mode 100644 index e09e322..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/static_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_down.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_down.bmp" deleted file mode 100644 index f362be7..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_down.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_hover.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_hover.bmp" deleted file mode 100644 index c8b41c4..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_hover.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_normal.bmp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_normal.bmp" deleted file mode 100644 index 731a70e..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/res/step_normal.bmp" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/resource.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/resource.h" deleted file mode 100644 index 8cc6cf4..0000000 Binary files "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/resource.h" and /dev/null differ diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/stdafx.cpp" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/stdafx.cpp" deleted file mode 100644 index 8f61270..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/stdafx.cpp" +++ /dev/null @@ -1,8 +0,0 @@ - -// stdafx.cpp : ֻ׼ļԴļ -// GhostMan.pch ΪԤͷ -// stdafx.obj ԤϢ - -#include "stdafx.h" - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/stdafx.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/stdafx.h" deleted file mode 100644 index 7d8a96a..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/stdafx.h" +++ /dev/null @@ -1,54 +0,0 @@ - -// stdafx.h : ׼ϵͳļİļ -// Ǿʹõĵ -// ضĿİļ - -#pragma once - -#ifndef VC_EXTRALEAN -#define VC_EXTRALEAN // Windows ͷųʹõ -#endif - -#include "targetver.h" - -#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // ijЩ CString 캯ʽ - -// ر MFC ijЩɷĺԵľϢ -#define _AFX_ALL_WARNINGS - -#include // MFC ͱ׼ -#include // MFC չ - - -#include // MFC Զ - - - -#ifndef _AFX_NO_OLE_SUPPORT -#include // MFC Internet Explorer 4 ؼ֧ -#endif -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC Windows ؼ֧ -#endif // _AFX_NO_AFXCMN_SUPPORT - -#include // Ϳؼ MFC ֧ - - - - - - - - - -#ifdef _UNICODE -#if defined _M_IX86 -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") -#elif defined _M_X64 -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") -#else -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") -#endif -#endif - - diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/targetver.h" "b/ProjectCode/release\347\211\210\346\234\254/GhostMan/targetver.h" deleted file mode 100644 index 0afac5b..0000000 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/targetver.h" +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// SDKDDKVer.h ߰汾Ŀ Windows ƽ̨ - -// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h -// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h - -#include diff --git a/Readme.md b/Readme.md index f7633f0..96854a5 100644 --- a/Readme.md +++ b/Readme.md @@ -1,91 +1,62 @@ -## 關於本項目 +## 关于本项目 Ghostman is a Search Algorithm's Demo about Blind Search algorithm and Heuristic Search. -## 寫在前面 +## 写在前面 -- 本項目是一個關于搜索算法的演示軟件,無任何商業用途 -- 本項目爲本人本科階段一個大作業,未進行嚴格的軟件測試 -- 該演示軟件使用Visual Studio 2013 進行開發,請注意編譯器的版本 -- 你可以下載該演示程序的源碼,僅供學習,勿用于任何商業用途 +- 本项目是一个关于搜索算法的演示软件,无任何商业用途 +- 本项目为本人本科阶段一个大作业,未进行严格的软件测试 +- 该演示软件使用Visual Studio 2013 进行开发,请注意编译器的版本 +- 你可以下载该演示程序的源码,仅供学习,勿用于任何商业用途 -## 軟體介面 +## 软体介面 -![軟體介面](http://7xi3e9.com1.z0.glb.clouddn.com/2015-06-30_083602.jpg) +![软体介面](http://7xi3e9.com1.z0.glb.clouddn.com/2015-06-30_083602.jpg) ## 演算法 -- 該算法演示程序主要演示如下幾個算法 - - 深度優先搜索算法(DFS) - - 廣度優先搜索算法(BFS) - - A星算法(A*) - - 迭代加深的A星算法(IDA*) - - 模擬退火算法(SA) +- 该算法演示程序主要演示如下几个算法 +- 深度优先搜索算法(DFS) +- 广度优先搜索算法(BFS) +- A星算法(A*) +- 迭代加深的A星算法(IDA*) +- 模拟退火算法(SA) -## 軟體使用 +## 软体使用 -- 總的演示程序分爲三塊 - - 迷宮尋路部分(用于演示BFS、DFS以及A*算法) - - 八數碼、井字圖部分(用于演示IDA*算法) - - 模擬退火部分(單獨用于演示SA算法) +- 总的演示程序分为三块 +- 迷宫寻路部分(用于演示BFS、DFS以及A*算法) +- 八数码、井字图部分(用于演示IDA*算法) +- 模拟退火部分(单独用于演示SA算法) -##迷宮尋路部分 +## 迷宫寻路部分 -- 起點和終點(用于設置起點和終點) -- 直接執行(直接運行算法,幷得到路徑) -- 單步執行(單步執行算法) -- 靜態擴展(算法覆蓋範圍的靜態擴展) -- 動態擴展(算法覆蓋範圍的動態擴展) +- 起点和终点(用于设置起点和终点) +- 直接执行(直接运行算法,幷得到路径) +- 单步执行(单步执行算法) +- 静态扩展(算法覆盖范围的静态扩展) +- 动态扩展(算法覆盖范围的动态扩展) ![enter image description here](http://7xi3e9.com1.z0.glb.clouddn.com/2.PNG) -## 八數碼、井字圖部分 +## 八数码、井字图部分 -- 只支持執行按鈕 -- 兩個演示均采用IDA*算法 -- 點擊執行按鈕後,將會先進行八數碼的演示(左邊的的拼圖),然後進行井字圖的演示 +- 只支持执行按钮 +- 两个演示均采用IDA*算法 +- 点击执行按钮后,将会先进行八数码的演示(左边的的拼图),然后进行井字图的演示 ![enter image description here](http://7xi3e9.com1.z0.glb.clouddn.com/3.PNG) -## 模擬退火部分 +## 模拟退火部分 -- 只支持執行按鈕 -- 紅色方塊代表火源 -- 藍色點代表最安全的位置 -- 最安全的位置定義爲:離火源最遠的點。(也就是和最近的那個火源的距離最大的點) -- 由于精度誤差(這裏演示轉換爲了整型變量),可能有個別點不太精確。 +- 只支持执行按钮 +- 红色方块代表火源 +- 蓝色点代表最安全的位置 +- 最安全的位置定义为:离火源最远的点。 (也就是和最近的那个火源的距离最大的点) +- 由于精度误差(这里演示转换为了整型变量),可能有个别点不太精确。 ![enter image description here](http://7xi3e9.com1.z0.glb.clouddn.com/4.PNG) - -## 開發者們 - -``` -typedef struct WEI_LEE{ - char college[233] = "Chang'an University"; - char skill[233] = "Algorithm"; - char email[233] = "bigballon@outlook.com"; -}BIGBALLON; - - -typedef struct JILONG_WAN{ - char college[233] = "Chang'an University"; - char skill[233] = "web"; - char email[233] = "1312369496@qq.com"; -}BLong; - -typedef struct SHIJIE_WENG{ - char college[233] = "Chang'an University"; - char skill[233] = "Safety"; - char email[233] = "907527136@qq.com"; -}ShiningRay; - -typedef struct ZUOWEN_DAI{ - char college[233] = "Chang'an University"; - char skill[233] = "C++"; - char email[233] = "270993760@qq.com"; -}ZUOZUO; -``` diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..1885487 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-midnight \ No newline at end of file diff --git a/ExecuteFile/GhostMan.exe b/exe/GhostMan.exe similarity index 69% rename from ExecuteFile/GhostMan.exe rename to exe/GhostMan.exe index f2bdc51..f11eff8 100644 Binary files a/ExecuteFile/GhostMan.exe and b/exe/GhostMan.exe differ diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan.sln" b/src/GhostMan.sln similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan.sln" rename to src/GhostMan.sln diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/ACOStatic.cpp" b/src/GhostMan/ACOStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/ACOStatic.cpp" rename to src/GhostMan/ACOStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/ACOStatic.h" b/src/GhostMan/ACOStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/ACOStatic.h" rename to src/GhostMan/ACOStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/AStarStatic.cpp" b/src/GhostMan/AStarStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/AStarStatic.cpp" rename to src/GhostMan/AStarStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/AStarStatic.h" b/src/GhostMan/AStarStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/AStarStatic.h" rename to src/GhostMan/AStarStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/BFSStatic.cpp" b/src/GhostMan/BFSStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/BFSStatic.cpp" rename to src/GhostMan/BFSStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/BFSStatic.h" b/src/GhostMan/BFSStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/BFSStatic.h" rename to src/GhostMan/BFSStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/CloseStatic.cpp" b/src/GhostMan/CloseStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/CloseStatic.cpp" rename to src/GhostMan/CloseStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/CloseStatic.h" b/src/GhostMan/CloseStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/CloseStatic.h" rename to src/GhostMan/CloseStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/DFSStatic.cpp" b/src/GhostMan/DFSStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/DFSStatic.cpp" rename to src/GhostMan/DFSStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/DFSStatic.h" b/src/GhostMan/DFSStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/DFSStatic.h" rename to src/GhostMan/DFSStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/DynamicStatic.cpp" b/src/GhostMan/DynamicStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/DynamicStatic.cpp" rename to src/GhostMan/DynamicStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/DynamicStatic.h" b/src/GhostMan/DynamicStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/DynamicStatic.h" rename to src/GhostMan/DynamicStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/ExecStatic.cpp" b/src/GhostMan/ExecStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/ExecStatic.cpp" rename to src/GhostMan/ExecStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/ExecStatic.h" b/src/GhostMan/ExecStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/ExecStatic.h" rename to src/GhostMan/ExecStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.aps" b/src/GhostMan/GhostMan.aps similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.aps" rename to src/GhostMan/GhostMan.aps diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.cpp" b/src/GhostMan/GhostMan.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.cpp" rename to src/GhostMan/GhostMan.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.h" b/src/GhostMan/GhostMan.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.h" rename to src/GhostMan/GhostMan.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.rc" b/src/GhostMan/GhostMan.rc similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.rc" rename to src/GhostMan/GhostMan.rc diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj" b/src/GhostMan/GhostMan.vcxproj similarity index 98% rename from "ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj" rename to src/GhostMan/GhostMan.vcxproj index de290e2..68bff05 100644 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj" +++ b/src/GhostMan/GhostMan.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -19,14 +19,14 @@ Application true - v120 + v140 Unicode Dynamic Application false - v120 + v140 true Unicode Static diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj.filters" b/src/GhostMan/GhostMan.vcxproj.filters similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj.filters" rename to src/GhostMan/GhostMan.vcxproj.filters diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj.user" b/src/GhostMan/GhostMan.vcxproj.user similarity index 100% rename from "ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostMan.vcxproj.user" rename to src/GhostMan/GhostMan.vcxproj.user diff --git "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostManDlg.cpp" b/src/GhostMan/GhostManDlg.cpp similarity index 99% rename from "ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostManDlg.cpp" rename to src/GhostMan/GhostManDlg.cpp index 815e0c2..72a4f0d 100644 --- "a/ProjectCode/release\347\211\210\346\234\254/GhostMan/GhostManDlg.cpp" +++ b/src/GhostMan/GhostManDlg.cpp @@ -2666,6 +2666,7 @@ bool CGhostManDlg::IDA_star(IDA_S s){ for (int i = 0; i < limit; ++i){ IDA_Path[i] = op[buff[i]]; } + return true; } else{ return false; diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostManDlg.h" b/src/GhostMan/GhostManDlg.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/GhostManDlg.h" rename to src/GhostMan/GhostManDlg.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/IDAStarStatic.cpp" b/src/GhostMan/IDAStarStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/IDAStarStatic.cpp" rename to src/GhostMan/IDAStarStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/IDAStarStatic.h" b/src/GhostMan/IDAStarStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/IDAStarStatic.h" rename to src/GhostMan/IDAStarStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/InitStatic.cpp" b/src/GhostMan/InitStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/InitStatic.cpp" rename to src/GhostMan/InitStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/InitStatic.h" b/src/GhostMan/InitStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/InitStatic.h" rename to src/GhostMan/InitStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/MinStatic.cpp" b/src/GhostMan/MinStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/MinStatic.cpp" rename to src/GhostMan/MinStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/MinStatic.h" b/src/GhostMan/MinStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/MinStatic.h" rename to src/GhostMan/MinStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/MyStatic.cpp" b/src/GhostMan/MyStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/MyStatic.cpp" rename to src/GhostMan/MyStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/MyStatic.h" b/src/GhostMan/MyStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/MyStatic.h" rename to src/GhostMan/MyStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/MyText.cpp" b/src/GhostMan/MyText.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/MyText.cpp" rename to src/GhostMan/MyText.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/MyText.h" b/src/GhostMan/MyText.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/MyText.h" rename to src/GhostMan/MyText.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/ReadMe.txt" b/src/GhostMan/ReadMe.txt similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/ReadMe.txt" rename to src/GhostMan/ReadMe.txt diff --git a/src/GhostMan/Release/GhostMan.Build.CppClean.log b/src/GhostMan/Release/GhostMan.Build.CppClean.log new file mode 100644 index 0000000..8cc515d --- /dev/null +++ b/src/GhostMan/Release/GhostMan.Build.CppClean.log @@ -0,0 +1,35 @@ +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.pch +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\vc140.pdb +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\stdafx.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ststatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\stepstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\setstartstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\setendstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\mytext.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\mystatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\minstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\initstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\idastarstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostmandlg.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\execstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\dynamicstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\dfsstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\closestatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\bfsstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\astarstatic.obj +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\acostatic.obj +c:\users\bigballon\videos\captures\ghost\src\release\ghostman.exe +c:\users\bigballon\videos\captures\ghost\src\release\ghostman.ipdb +c:\users\bigballon\videos\captures\ghost\src\release\ghostman.iobj +c:\users\bigballon\videos\captures\ghost\src\release\ghostman.pdb +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.res +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\cl.command.1.tlog +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\cl.read.1.tlog +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\cl.write.1.tlog +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\link.command.1.tlog +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\link.read.1.tlog +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\link.write.1.tlog +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\rc.command.1.tlog +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\rc.read.1.tlog +c:\users\bigballon\videos\captures\ghost\src\ghostman\release\ghostman.tlog\rc.write.1.tlog diff --git a/src/GhostMan/Release/GhostMan.log b/src/GhostMan/Release/GhostMan.log new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/src/GhostMan/Release/GhostMan.log @@ -0,0 +1 @@ + \ No newline at end of file diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/STStatic.cpp" b/src/GhostMan/STStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/STStatic.cpp" rename to src/GhostMan/STStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/STStatic.h" b/src/GhostMan/STStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/STStatic.h" rename to src/GhostMan/STStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/SetEndStatic.cpp" b/src/GhostMan/SetEndStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/SetEndStatic.cpp" rename to src/GhostMan/SetEndStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/SetEndStatic.h" b/src/GhostMan/SetEndStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/SetEndStatic.h" rename to src/GhostMan/SetEndStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/SetStartStatic.cpp" b/src/GhostMan/SetStartStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/SetStartStatic.cpp" rename to src/GhostMan/SetStartStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/SetStartStatic.h" b/src/GhostMan/SetStartStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/SetStartStatic.h" rename to src/GhostMan/SetStartStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/StepStatic.cpp" b/src/GhostMan/StepStatic.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/StepStatic.cpp" rename to src/GhostMan/StepStatic.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/StepStatic.h" b/src/GhostMan/StepStatic.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/StepStatic.h" rename to src/GhostMan/StepStatic.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/AStar_hover.bmp" b/src/GhostMan/res/AStar_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/AStar_hover.bmp" rename to src/GhostMan/res/AStar_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/Astar_normal.bmp" b/src/GhostMan/res/Astar_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/Astar_normal.bmp" rename to src/GhostMan/res/Astar_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/GhostMan.rc2" b/src/GhostMan/res/GhostMan.rc2 similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/GhostMan.rc2" rename to src/GhostMan/res/GhostMan.rc2 diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/bfs_hover.bmp" b/src/GhostMan/res/bfs_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/bfs_hover.bmp" rename to src/GhostMan/res/bfs_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/bfs_normal.bmp" b/src/GhostMan/res/bfs_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/bfs_normal.bmp" rename to src/GhostMan/res/bfs_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/bg_global.bmp" b/src/GhostMan/res/bg_global.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/bg_global.bmp" rename to src/GhostMan/res/bg_global.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/close_down.bmp" b/src/GhostMan/res/close_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/close_down.bmp" rename to src/GhostMan/res/close_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/close_hover.bmp" b/src/GhostMan/res/close_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/close_hover.bmp" rename to src/GhostMan/res/close_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/close_normal.bmp" b/src/GhostMan/res/close_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/close_normal.bmp" rename to src/GhostMan/res/close_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dfs_hover.bmp" b/src/GhostMan/res/dfs_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dfs_hover.bmp" rename to src/GhostMan/res/dfs_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dfs_normal.bmp" b/src/GhostMan/res/dfs_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dfs_normal.bmp" rename to src/GhostMan/res/dfs_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dynamic_down.bmp" b/src/GhostMan/res/dynamic_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dynamic_down.bmp" rename to src/GhostMan/res/dynamic_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dynamic_hover.bmp" b/src/GhostMan/res/dynamic_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dynamic_hover.bmp" rename to src/GhostMan/res/dynamic_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dynamic_normal.bmp" b/src/GhostMan/res/dynamic_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/dynamic_normal.bmp" rename to src/GhostMan/res/dynamic_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/end_down.bmp" b/src/GhostMan/res/end_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/end_down.bmp" rename to src/GhostMan/res/end_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/end_hover.bmp" b/src/GhostMan/res/end_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/end_hover.bmp" rename to src/GhostMan/res/end_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/end_normal.bmp" b/src/GhostMan/res/end_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/end_normal.bmp" rename to src/GhostMan/res/end_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/exec_down.bmp" b/src/GhostMan/res/exec_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/exec_down.bmp" rename to src/GhostMan/res/exec_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/exec_hover.bmp" b/src/GhostMan/res/exec_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/exec_hover.bmp" rename to src/GhostMan/res/exec_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/exec_normal.bmp" b/src/GhostMan/res/exec_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/exec_normal.bmp" rename to src/GhostMan/res/exec_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/header.bmp" b/src/GhostMan/res/header.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/header.bmp" rename to src/GhostMan/res/header.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/hover.bmp" b/src/GhostMan/res/hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/hover.bmp" rename to src/GhostMan/res/hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/idastar_hover.bmp" b/src/GhostMan/res/idastar_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/idastar_hover.bmp" rename to src/GhostMan/res/idastar_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/idastar_normal.bmp" b/src/GhostMan/res/idastar_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/idastar_normal.bmp" rename to src/GhostMan/res/idastar_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/init_down.bmp" b/src/GhostMan/res/init_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/init_down.bmp" rename to src/GhostMan/res/init_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/init_hover.bmp" b/src/GhostMan/res/init_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/init_hover.bmp" rename to src/GhostMan/res/init_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/init_normal.bmp" b/src/GhostMan/res/init_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/init_normal.bmp" rename to src/GhostMan/res/init_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_01.bmp" b/src/GhostMan/res/kungfu-panda_01.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_01.bmp" rename to src/GhostMan/res/kungfu-panda_01.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_02.bmp" b/src/GhostMan/res/kungfu-panda_02.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_02.bmp" rename to src/GhostMan/res/kungfu-panda_02.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_03.bmp" b/src/GhostMan/res/kungfu-panda_03.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_03.bmp" rename to src/GhostMan/res/kungfu-panda_03.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_04.bmp" b/src/GhostMan/res/kungfu-panda_04.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_04.bmp" rename to src/GhostMan/res/kungfu-panda_04.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_05.bmp" b/src/GhostMan/res/kungfu-panda_05.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_05.bmp" rename to src/GhostMan/res/kungfu-panda_05.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_06.bmp" b/src/GhostMan/res/kungfu-panda_06.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_06.bmp" rename to src/GhostMan/res/kungfu-panda_06.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_07.bmp" b/src/GhostMan/res/kungfu-panda_07.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_07.bmp" rename to src/GhostMan/res/kungfu-panda_07.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_08.bmp" b/src/GhostMan/res/kungfu-panda_08.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_08.bmp" rename to src/GhostMan/res/kungfu-panda_08.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_09.bmp" b/src/GhostMan/res/kungfu-panda_09.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/kungfu-panda_09.bmp" rename to src/GhostMan/res/kungfu-panda_09.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/logo.bmp" b/src/GhostMan/res/logo.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/logo.bmp" rename to src/GhostMan/res/logo.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/logo.ico" b/src/GhostMan/res/logo.ico similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/logo.ico" rename to src/GhostMan/res/logo.ico diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/logo_main.bmp" b/src/GhostMan/res/logo_main.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/logo_main.bmp" rename to src/GhostMan/res/logo_main.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/map_introduction.bmp" b/src/GhostMan/res/map_introduction.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/map_introduction.bmp" rename to src/GhostMan/res/map_introduction.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/max_down.bmp" b/src/GhostMan/res/max_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/max_down.bmp" rename to src/GhostMan/res/max_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/max_hover.bmp" b/src/GhostMan/res/max_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/max_hover.bmp" rename to src/GhostMan/res/max_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/max_normal.bmp" b/src/GhostMan/res/max_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/max_normal.bmp" rename to src/GhostMan/res/max_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/min_down.bmp" b/src/GhostMan/res/min_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/min_down.bmp" rename to src/GhostMan/res/min_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/min_hover.bmp" b/src/GhostMan/res/min_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/min_hover.bmp" rename to src/GhostMan/res/min_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/min_normal.bmp" b/src/GhostMan/res/min_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/min_normal.bmp" rename to src/GhostMan/res/min_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/normal.bmp" b/src/GhostMan/res/normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/normal.bmp" rename to src/GhostMan/res/normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/start_down.bmp" b/src/GhostMan/res/start_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/start_down.bmp" rename to src/GhostMan/res/start_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/start_hover.bmp" b/src/GhostMan/res/start_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/start_hover.bmp" rename to src/GhostMan/res/start_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/start_normal.bmp" b/src/GhostMan/res/start_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/start_normal.bmp" rename to src/GhostMan/res/start_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/static_down.bmp" b/src/GhostMan/res/static_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/static_down.bmp" rename to src/GhostMan/res/static_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/static_hover.bmp" b/src/GhostMan/res/static_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/static_hover.bmp" rename to src/GhostMan/res/static_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/static_normal.bmp" b/src/GhostMan/res/static_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/static_normal.bmp" rename to src/GhostMan/res/static_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/step_down.bmp" b/src/GhostMan/res/step_down.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/step_down.bmp" rename to src/GhostMan/res/step_down.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/step_hover.bmp" b/src/GhostMan/res/step_hover.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/step_hover.bmp" rename to src/GhostMan/res/step_hover.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/step_normal.bmp" b/src/GhostMan/res/step_normal.bmp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/res/step_normal.bmp" rename to src/GhostMan/res/step_normal.bmp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/resource.h" b/src/GhostMan/resource.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/resource.h" rename to src/GhostMan/resource.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/stdafx.cpp" b/src/GhostMan/stdafx.cpp similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/stdafx.cpp" rename to src/GhostMan/stdafx.cpp diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/stdafx.h" b/src/GhostMan/stdafx.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/stdafx.h" rename to src/GhostMan/stdafx.h diff --git "a/ProjectCode/debug\347\211\210\346\234\254/GhostMan/targetver.h" b/src/GhostMan/targetver.h similarity index 100% rename from "ProjectCode/debug\347\211\210\346\234\254/GhostMan/targetver.h" rename to src/GhostMan/targetver.h