[Add] Npc 여러개 추가

This commit is contained in:
hyunbin14
2026-01-04 20:30:06 +09:00
parent 0a3f7618dd
commit 14ca444bb8
203 changed files with 2836 additions and 418 deletions
+70 -20
View File
@@ -10,12 +10,16 @@ HINSTANCE g_hInstance;
HWND g_hWnd;
WCHAR szTitle[MAX_LOADSTRING];
WCHAR szWindowClass[MAX_LOADSTRING];
_bool g_bFullscreen = false;
RECT g_rcWindowed = {};
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
void ToggleFullscreen();
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
@@ -197,30 +201,24 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
g_hWnd = hWnd;
#ifndef _DEBUG
//int screenX = GetSystemMetrics(SM_CXSCREEN);
//int screenY = GetSystemMetrics(SM_CYSCREEN);
{
g_bFullscreen = true;
//HWND hWnd = CreateWindowW(
// szWindowClass,
// szTitle,
// WS_POPUP,
// 0, 0,
// screenX, screenY,
// nullptr,
// nullptr,
// hInstance,
// nullptr
//);
SetWindowLong(g_hWnd, GWL_STYLE, GetWindowLong(g_hWnd, GWL_STYLE) & ~WS_OVERLAPPEDWINDOW);
//if (!hWnd)
// return FALSE;
_int screenX = GetSystemMetrics(SM_CXSCREEN);
_int screenY = GetSystemMetrics(SM_CYSCREEN);
//g_hWnd = hWnd;
SetWindowPos(
g_hWnd,
HWND_TOP,
0, 0,
screenX, screenY,
SWP_NOOWNERZORDER | SWP_FRAMECHANGED
);
}
#endif
//ShowWindow(hWnd, SW_SHOW);
//UpdateWindow(hWnd);
#endif // !_DEBUG
return TRUE;
}
@@ -235,9 +233,61 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_SYSKEYDOWN:
{
if (wParam == VK_RETURN && (lParam & (1 << 29)))
{
ToggleFullscreen();
return 0;
}
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
void ToggleFullscreen()
{
DWORD style = GetWindowLong(g_hWnd, GWL_STYLE);
if (!g_bFullscreen)
{
GetWindowRect(g_hWnd, &g_rcWindowed);
SetWindowLong(g_hWnd, GWL_STYLE, style & ~WS_OVERLAPPEDWINDOW);
_int screenX = GetSystemMetrics(SM_CXSCREEN);
_int screenY = GetSystemMetrics(SM_CYSCREEN);
SetWindowPos(
g_hWnd,
HWND_TOP,
0, 0,
screenX, screenY,
SWP_NOOWNERZORDER | SWP_FRAMECHANGED
);
g_bFullscreen = true;
}
else
{
SetWindowLong(g_hWnd, GWL_STYLE, style | WS_OVERLAPPEDWINDOW);
SetWindowPos(
g_hWnd,
HWND_NOTOPMOST,
g_rcWindowed.left,
g_rcWindowed.top,
g_rcWindowed.right - g_rcWindowed.left,
g_rcWindowed.bottom - g_rcWindowed.top,
SWP_NOOWNERZORDER | SWP_FRAMECHANGED
);
g_bFullscreen = false;
}
}