16 SetActiveWindow(
hwnd);
17 SetForegroundWindow(
hwnd);
18 SendMessageW(
hwnd, WM_ACTIVATEAPP, 1, 0);
25 while (PeekMessageW(&msg,
hwnd, 0, 0, PM_REMOVE)) {
26 if (msg.message == WM_QUIT) {
30 TranslateMessage(&msg);
31 DispatchMessageW(&msg);
37 if (PeekMessageW(&msg, 0, 0, 0, PM_REMOVE)) {
38 if (msg.message == WM_QUIT) {
42 TranslateMessage(&msg);
43 DispatchMessageW(&msg);
51 GetWindowRect(
hwnd, &rc);
56 GetWindowRect(
hwnd, &rc);
61 GetClientRect(
hwnd, &rc);
62 return rc.right - rc.left;
66 GetClientRect(
hwnd, &rc);
67 return rc.bottom - rc.top;
72 Point transformed = pt;
73 ScreenToClient(
hwnd, (POINT *)&transformed);
81 if (wparam == VK_CONTROL) {
85 if (wparam == VK_SNAPSHOT) {
93 return *
result = (
void *)1,
true;
94 case WM_WINDOWPOSCHANGED:
105 ExitProcess(GetLastError());
116 case WM_LBUTTONDOWN: {
117 gameCallback->OnMouseLeftClick(LOWORD(lparam), HIWORD(lparam));
121 case WM_RBUTTONDOWN: {
122 gameCallback->OnMouseRightClick(LOWORD(lparam), HIWORD(lparam));
134 case WM_LBUTTONDBLCLK: {
135 gameCallback->OnMouseLeftDoubleClick(LOWORD(lparam), HIWORD(lparam));
139 case WM_RBUTTONDBLCLK: {
140 gameCallback->OnMouseRightDoubleClick(LOWORD(lparam), HIWORD(lparam));
145 gameCallback->OnMouseMove(LOWORD(lparam), HIWORD(lparam), wparam & MK_LBUTTON, wparam & MK_RBUTTON);
149 if (wparam == SC_SCREENSAVE || wparam == SC_MONITORPOWER)
154 gameCallback->OnVkDown(wparam, MapVirtualKeyW(wparam, MAPVK_VK_TO_CHAR));
158 if (wparam && (GetForegroundWindow() ==
hwnd)) {
174 if (!
hwnd)
return false;
176 if (!GetUpdateRect(
hwnd, 0, 0)) {
183 BeginPaint(
hwnd, &Paint);
187 EndPaint(
hwnd, &Paint);
190 return *
result = 0,
false;
194 if (msg == WM_NCCREATE) {
195 CREATESTRUCTA *cs = (CREATESTRUCTA *)(lparam);
196 SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)cs->lpCreateParams);
197 return (
void *)DefWindowProcW(hwnd, msg, wparam, (LPARAM)lparam);
203 if (
window->WinApiMessageProc(msg, wparam, lparam, &
result))
206 return (
void *)DefWindowProcW(hwnd, msg, (WPARAM)wparam, (LPARAM)lparam);
210 ShowWindow(
hwnd, SW_SHOWNORMAL);
216 GetCursorPos(&cursor_pos);
218 if (!strcmp(cursor_name,
"MICON1")) {
221 SetClassLongPtrW(
hwnd, GCLP_HCURSOR, (LONG_PTR)LoadCursor(NULL, IDC_ARROW));
222 }
else if (!strcmp(cursor_name,
"MICON2")) {
229 "Ritor1: original cursor(Target) isn't loading",
"", 0);
232 SetClassLongPtrW(
hwnd, GCLP_HCURSOR, (LONG_PTR)LoadCursor(NULL, IDC_CROSS));
233 }
else if (!strcmp(cursor_name,
"MICON3")) {
234 SetClassLongPtrW(
hwnd, GCLP_HCURSOR, (LONG_PTR)LoadCursor(NULL, IDC_WAIT));
238 SetCursorPos(cursor_pos.x, cursor_pos.y);
244 SetMenu(
hwnd,
nullptr);
249 SetWindowLongW(
hwnd, GWL_EXSTYLE, WS_EX_TOPMOST);
250 SetWindowLongW(
hwnd, GWL_STYLE, WS_VISIBLE | WS_POPUP);
252 SetWindowPos(
hwnd, HWND_TOP, 0, 0, -1, -1, SWP_NOSIZE | SWP_SHOWWINDOW);
257 GetWindowRect(
hwnd, &rcWindowPos);
259 SetWindowLongW(
hwnd, GWL_EXSTYLE, 0);
260 SetWindowLongW(
hwnd, GWL_STYLE, WS_VISIBLE | WS_OVERLAPPEDWINDOW);
261 SetWindowPos(
hwnd, HWND_TOP, 0, 0, -1, -1, 0);
264 GetWindowRect(
hwnd, &rcWindow);
267 GetClientRect(
hwnd, &rcClient);
269 int window_borders_width = (rcWindow.right - rcWindow.left) - (rcClient.right - rcClient.left);
270 int window_borders_height = (rcWindow.bottom - rcWindow.top) - (rcClient.bottom - rcClient.top);
271 int window_total_width = new_window_width + window_borders_width;
272 int window_total_height = new_window_height + window_borders_height;
275 if (!GetMenu(
hwnd)) {
276 window_total_height += GetSystemMetrics(SM_CYMENU);
280 MoveWindow(
hwnd, rcWindowPos.left, rcWindowPos.top, window_total_width, window_total_height, 0);
284 SetMenu(
hwnd, debug_menu);
286 GetWindowRect(
hwnd, &rcWindow);
287 GetClientRect(
hwnd, &rcClient);
292 HMENU menu = CreateMenu();
294 HMENU file = CreatePopupMenu();
295 AppendMenuW(menu, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)file,
298 AppendMenuW(file, MF_ENABLED | MF_STRING, 40001, L
"Exit");
299 AppendMenuW(file, MF_ENABLED | MF_STRING, 40002,
303 HMENU debug = CreatePopupMenu();
304 AppendMenuW(menu, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug,
307 HMENU debug_party = CreatePopupMenu();
308 AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP,
309 (UINT_PTR)debug_party, L
"&Party");
311 AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40007,
312 L
"Give Gold (10 000)");
313 AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40008,
314 L
"Give Exp (20 000)");
315 AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40059,
316 L
"Give Skills (50 each)");
317 AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40060,
319 AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40013,
322 HMENU debug_party_setconditions = CreatePopupMenu();
323 AppendMenuW(debug_party, MF_ENABLED | MF_STRING | MF_POPUP,
324 (UINT_PTR)debug_party_setconditions,
327 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40044, L
"Afraid");
328 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40043, L
"Asleep");
329 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40037, L
"Curse");
330 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40036, L
"Disease Weak");
331 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40035, L
"Disease Medium");
332 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40034, L
"Disease Severe");
333 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40041, L
"Dead");
334 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40039, L
"Drunk");
335 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40042, L
"Eradicated");
336 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40038, L
"Insane");
337 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40045, L
"Paralyzed");
338 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40033, L
"Poison Weak");
339 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40032, L
"Poison Medium");
340 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40031, L
"Poison Severe");
341 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40029, L
"&Stone");
342 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40040, L
"Unconscious");
343 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40030, L
"Weak");
344 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40073, L
"Zombie");
345 AppendMenuW(debug_party_setconditions, MF_ENABLED | MF_STRING, 40046, L
"Good");
348 AppendMenuW(debug_party, MF_ENABLED | MF_STRING, 40006, L
"Set Food (20)");
350 HMENU debug_party_alignment = CreatePopupMenu();
351 AppendMenuW(debug_party, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_party_alignment, L
"Alignment");
353 AppendMenuW(debug_party_alignment, MF_ENABLED | MF_STRING, 40062, L
"Good");
354 AppendMenuW(debug_party_alignment, MF_ENABLED | MF_STRING | MF_CHECKED, 40063, L
"Neutral");
355 AppendMenuW(debug_party_alignment, MF_ENABLED | MF_STRING, 40064, L
"Evil");
358 AppendMenuW(debug, MF_ENABLED | MF_STRING, 40122, L
"Actors off");
359 HMENU debug_time = CreatePopupMenu();
360 AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)debug_time, L
"&Time");
362 AppendMenuW(debug_time, MF_ENABLED | MF_STRING, 40009, L
"Add 1 Day");
363 AppendMenuW(debug_time, MF_ENABLED | MF_STRING, 40010, L
"Add 1 Week");
364 AppendMenuW(debug_time, MF_ENABLED | MF_STRING, 40011, L
"Add 1 Month");
365 AppendMenuW(debug_time, MF_ENABLED | MF_STRING, 40012, L
"Add 1 Year");
368 HMENU debug_items = CreatePopupMenu();
369 AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP,
370 (UINT_PTR)debug_items, L
"&Items");
372 AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40015, L
"Generate level &1 item");
373 AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40016, L
"Generate level &2 item");
374 AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40017, L
"Generate level &3 item");
375 AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40018, L
"Generate level &4 item");
376 AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40019, L
"Generate level &5 item");
377 AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40020, L
"Generate level &6 item");
378 AppendMenuW(debug_items, MF_ENABLED | MF_STRING, 40061, L
"Generate special item");
381 HMENU debug_graphics = CreatePopupMenu();
382 AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP,
383 (UINT_PTR)debug_graphics, L
"&Graphics");
385 HMENU lights_off = CreatePopupMenu();
386 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_POPUP,
387 (UINT_PTR)lights_off, L
"Lights");
389 AppendMenuW(lights_off, MF_ENABLED | MF_STRING, 40123, L
"Lights on");
390 AppendMenuW(lights_off, MF_ENABLED | MF_STRING, 40124, L
"Lights off");
393 HMENU debug_lights = CreatePopupMenu();
394 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_POPUP,
395 (UINT_PTR)debug_lights, L
"Debug Lights");
397 AppendMenuW(debug_lights, MF_ENABLED | MF_STRING, 40125, L
"Debug lights on");
398 AppendMenuW(debug_lights, MF_ENABLED | MF_STRING, 40126, L
"Debug lights off");
401 HMENU debug_terrain = CreatePopupMenu();
402 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_POPUP,
403 (UINT_PTR)debug_terrain,
406 AppendMenuW(debug_terrain, MF_ENABLED | MF_STRING, 40127, L
"Debug Terrain on");
407 AppendMenuW(debug_terrain, MF_ENABLED | MF_STRING, 40128, L
"Debug Terrain off");
409 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40023, L
"Lighting Mode");
410 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40024, L
"Lighting Geometry");
414 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40105, L
"Colored Lights");
415 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40101, L
"Debug Decals");
416 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40027, L
"HWID Portals");
417 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40047, L
"SWID Portals");
418 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40051, L
"OD Frustum");
419 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40054, L
"SWOD Constant Redraw");
420 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40055, L
"SWOD Lit Rasterizer");
421 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40056, L
"Party Light off");
422 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40060, L
"SWOD Nice Lighting off");
423 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40067, L
"HWOD Additive Fog Lights");
424 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40072, L
"HWID Nice Lighting");
425 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40048, L
"Wireframe");
426 AppendMenuW(debug_graphics, MF_ENABLED | MF_STRING | MF_GRAYED, 40049, L
"Fog");
429 HMENU debug_misc = CreatePopupMenu();
430 AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP,
431 (UINT_PTR)debug_misc, L
"&Misc");
433 AppendMenuW(debug_misc, MF_ENABLED | MF_STRING | MF_GRAYED, 40066, L
"Object Viewcone Culling");
434 AppendMenuW(debug_misc, MF_ENABLED | MF_STRING | MF_GRAYED, 40068, L
"Red Tint");
435 AppendMenuW(debug_misc, MF_ENABLED | MF_STRING | MF_GRAYED, 40071, L
"Display Secrets");
436 AppendMenuW(debug_misc, MF_ENABLED | MF_STRING | MF_GRAYED, 40102, L
"Massive Bloodsplat");
437 AppendMenuW(debug_misc, MF_ENABLED | MF_STRING | MF_GRAYED, 40103, L
"Underwater Gravity");
440 HMENU debug_eax = CreatePopupMenu();
441 AppendMenuW(debug, MF_ENABLED | MF_STRING | MF_POPUP,
442 (UINT_PTR)debug_eax, L
"EAX Environs");
444 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40074, L
"NONE");
445 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40075, L
"GENERIC");
446 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40076, L
"PADDEDCELL");
447 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40077, L
"ROOM");
448 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40078, L
"BATHROOM");
449 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40079, L
"LIVINGROOM");
450 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40080, L
"STONEROOM");
451 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40081, L
"AUDITORIUM");
452 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40082, L
"CONCERTHALL");
453 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40083, L
"CAVE");
454 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40084, L
"ARENA");
455 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40085, L
"HANGAR");
456 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40086, L
"CARPETEDHALLWAY");
457 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40087, L
"HALLWAY");
458 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40088, L
"STONECORRIDOR");
459 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40089, L
"ALLEY");
460 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40090, L
"FOREST");
461 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40091, L
"CITY");
462 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40092, L
"MOUNTAINS");
463 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40093, L
"QUARRY");
464 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40094, L
"PLAIN");
465 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40095, L
"PARKINGLOT");
466 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40096, L
"SEWERPIPE");
467 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40097, L
"UNDERWATER");
468 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40098, L
"DRUGGED");
469 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40099, L
"DIZZY");
470 AppendMenuW(debug_eax, MF_ENABLED | MF_STRING | MF_GRAYED, 40100, L
"PSICHOTIC");
473 HMENU other = CreatePopupMenu();
474 AppendMenuW(menu, MF_ENABLED | MF_STRING | MF_POPUP, (UINT_PTR)other,
477 HMENU other_wizard_eye = CreatePopupMenu();
478 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
479 (UINT_PTR)other_wizard_eye, L
"Wizard eye");
481 AppendMenuW(other_wizard_eye, MF_ENABLED | MF_STRING, 40101, L
"Wizard eye on");
482 AppendMenuW(other_wizard_eye, MF_ENABLED | MF_STRING, 40102, L
"Wizard eye off");
485 HMENU other_new_draw_object_dist = CreatePopupMenu();
486 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
487 (UINT_PTR)other_new_draw_object_dist,
488 L
"New draw object distance");
490 AppendMenuW(other_new_draw_object_dist, MF_ENABLED | MF_STRING, 40103, L
"New draw object dist on");
491 AppendMenuW(other_new_draw_object_dist, MF_ENABLED | MF_STRING, 40104, L
"New draw object dist off");
494 HMENU other_change_seasons = CreatePopupMenu();
495 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
496 (UINT_PTR)other_change_seasons, L
"Change seasons");
498 AppendMenuW(other_change_seasons, MF_ENABLED | MF_STRING, 40105, L
"Change seasons on");
499 AppendMenuW(other_change_seasons, MF_ENABLED | MF_STRING, 40106, L
"Change seasons off");
502 HMENU other_all_magic = CreatePopupMenu();
503 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
504 (UINT_PTR)other_all_magic, L
"All magic");
506 AppendMenuW(other_all_magic, MF_ENABLED | MF_STRING, 40107, L
"All magic on");
507 AppendMenuW(other_all_magic, MF_ENABLED | MF_STRING, 40108, L
"All magic off");
510 HMENU other_debug_information = CreatePopupMenu();
511 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
512 (UINT_PTR)other_debug_information,
513 L
"Debug information");
515 AppendMenuW(other_debug_information, MF_ENABLED | MF_STRING, 40109, L
"Debug information on");
516 AppendMenuW(other_debug_information, MF_ENABLED | MF_STRING, 40110, L
"Debug information off");
519 HMENU other_show_picked_face = CreatePopupMenu();
520 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
521 (UINT_PTR)other_show_picked_face, L
"Show picked face");
523 AppendMenuW(other_show_picked_face, MF_ENABLED | MF_STRING, 40111, L
"Show picked face on");
524 AppendMenuW(other_show_picked_face, MF_ENABLED | MF_STRING, 40112, L
"Show picked face off");
527 HMENU other_draw_portals_loops = CreatePopupMenu();
528 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
529 (UINT_PTR)other_draw_portals_loops,
530 L
"Draw portals loops");
532 AppendMenuW(other_draw_portals_loops, MF_ENABLED | MF_STRING, 40113, L
"Draw portals loops on");
533 AppendMenuW(other_draw_portals_loops, MF_ENABLED | MF_STRING, 40114, L
"Draw portals loops off");
536 HMENU other_new_speed = CreatePopupMenu();
537 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
538 (UINT_PTR)other_new_speed, L
"New_speed");
540 AppendMenuW(other_new_speed, MF_ENABLED | MF_STRING, 40115, L
"New_speed on");
541 AppendMenuW(other_new_speed, MF_ENABLED | MF_STRING, 40116, L
"New_speed off");
544 HMENU other_snow = CreatePopupMenu();
545 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
546 (UINT_PTR)other_snow, L
"Snow");
548 AppendMenuW(other_snow, MF_ENABLED | MF_STRING, 40117, L
"Snowfall on");
549 AppendMenuW(other_snow, MF_ENABLED | MF_STRING, 40118, L
"Snowfall off");
552 HMENU other_draw_terrain_dist_mist = CreatePopupMenu();
553 AppendMenuW(other, MF_ENABLED | MF_STRING | MF_POPUP,
554 (UINT_PTR)other_draw_terrain_dist_mist,
555 L
"New draw terrain distance");
557 AppendMenuW(other_draw_terrain_dist_mist, MF_ENABLED | MF_STRING, 40119, L
"New draw terrain distance on");
558 AppendMenuW(other_draw_terrain_dist_mist, MF_ENABLED | MF_STRING, 40120, L
"New draw terrain distance off");
575 SendMessageW(
hwnd, WM_DESTROY, 0, 0);
579 render->SavePCXScreenshot();
608 for (
uint i = 1; i < 5; ++i) {
609 for (
int ski = 0; ski < 37; ++ski) {
723 if (
pPlayers[i]->skillMerchant == 0)
733 if (
pPlayers[i]->skillBodybuilding == 0)
738 if (
pPlayers[i]->skillMeditation == 0)
743 if (
pPlayers[i]->skillPerception == 0)
752 if (
pPlayers[i]->skillDisarmTrap == 0)
767 if (
pPlayers[i]->skillMonsterId == 0)
772 if (
pPlayers[i]->skillArmsmaster == 0)
777 if (
pPlayers[i]->skillStealing == 0)
787 if (
pPlayers[i]->skillLearning == 0)
905 int pItemID = rand() % 500;
906 for (
uint i = 0; i < 500; ++i) {
907 if (pItemID + i > 499) pItemID = 0;
909 (item_id - 40015 + 1)) {
917 int pItemID = rand() % 500;
918 for (
uint i = 0; i < 500; ++i) {
919 if (pItemID + i > 499) pItemID = 0;
929 engine->SetDebugWizardEye(
true);
932 engine->SetDebugWizardEye(
false);
941 engine->SetSeasonsChange(
true);
944 engine->SetSeasonsChange(
false);
947 engine->SetDebugAllMagic(
true);
950 engine->SetDebugAllMagic(
false);
953 engine->SetDebugShowFps(
true);
956 engine->SetDebugShowFps(
false);
959 engine->SetDebugShowPickedFace(
true);
962 engine->SetDebugShowPickedFace(
false);
965 engine->SetDebugPortalOutlines(
true);
968 engine->SetDebugPortalOutlines(
false);
971 engine->SetDebugTurboSpeed(
true);
974 engine->SetDebugTurboSpeed(
false);
977 engine->SetAllowSnow(
true);
980 engine->SetAllowSnow(
false);
983 engine->SetExtendedDrawDistance(
true);
986 engine->SetExtendedDrawDistance(
false);
989 engine->SetNoActors(
true);
992 engine->SetAllowLightmaps(
true);
995 engine->SetAllowLightmaps(
false);
998 engine->SetDebugLightmapsDecals(
true);
1001 engine->SetDebugLightmapsDecals(
false);
1004 engine->SetDebugTerrain(
true);
1007 engine->SetDebugTerrain(
false);