- Timestamp:
- Oct 18, 2009, 4:26:30 AM (15 years ago)
- Location:
- Daodan
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan.c
r467 r468 54 54 55 55 bool opt_usedaodanbsl = true; 56 bool opt_border = true; 57 bool opt_shadow = true; 58 bool opt_topmost = false; 56 59 57 60 bool DDrPatch_Init() … … 213 216 if (!stricmp(name, "usedaodanbsl")) 214 217 opt_usedaodanbsl = !stricmp(inifile_cleanstr(value), "true"); 218 else if (!stricmp(name, "border")) 219 opt_border = !stricmp(inifile_cleanstr(value), "true"); 220 else if (!stricmp(name, "shadow")) 221 opt_shadow = !stricmp(inifile_cleanstr(value), "true"); 222 else if (!stricmp(name, "topmost")) 223 opt_topmost = !stricmp(inifile_cleanstr(value), "true"); 224 else if (!stricmp(name, "multibyte")) 225 patch_multibyte = !stricmp(inifile_cleanstr(value), "true"); 215 226 else if (!stricmp(name, "debug")) 216 227 AKgDebug_DebugMaps = !stricmp(inifile_cleanstr(value), "true"); -
Daodan/src/Daodan.h
r273 r468 11 11 extern HMODULE DDrONiModule; 12 12 13 extern bool opt_border; 14 extern bool opt_shadow; 15 extern bool opt_topmost; 16 13 17 #endif -
Daodan/src/Daodan_Character.c
r446 r468 31 31 return -1; //not found :( 32 32 } 33 33 /* 34 34 OniRectangle TestRect; 35 35 void CHARTest() … … 59 59 return; 60 60 } 61 */ -
Daodan/src/Daodan_WindowHack.c
r435 r468 7 7 #include "BFW_Motoko_Draw.h" 8 8 #include "oni_gl.h" 9 10 #define CS_DROPSHADOW 0x20000 9 11 10 12 volatile HWND onihwnd, boxhwnd = NULL; … … 17 19 { 18 20 case WM_KEYDOWN: 19 if (wParam == VK_F5) {20 MessageBox(0, "test", "", 0);21 CHARTest();22 }23 21 case WM_ACTIVATE: 24 22 case WM_CHAR: … … 41 39 } 42 40 break; 43 case WM_CLOSE:44 CHARTest();45 break;41 // case WM_CLOSE: 42 // CHARTest(); 43 // break; 46 44 case WM_DESTROY: 47 45 PostQuitMessage(0); … … 67 65 68 66 wc.cbSize = sizeof(WNDCLASSEX); 69 wc.style = 0;67 wc.style = (opt_border ? 0 : (opt_shadow ? CS_DROPSHADOW : 0)); 70 68 wc.lpfnWndProc = DDrHack_WndProc; 71 69 wc.cbClsExtra = 0; … … 85 83 re.right = re.left + 640; 86 84 re.bottom = re.top + 480; 87 AdjustWindowRect(&re, WS_POPUP | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU, FALSE);85 AdjustWindowRect(&re, WS_POPUP | (opt_border ? WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU : 0), FALSE); 88 86 89 boxhwnd = CreateWindowEx(0, "OniGanbatte", "Oni", WS_POPUP | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU, re.left, re.top, re.right - re.left, re.bottom - re.top, NULL, NULL, DDrDLLModule, NULL); 90 ShowWindow(boxhwnd, SW_SHOW); 91 UpdateWindow(boxhwnd); 87 boxhwnd = CreateWindowEx(0, "OniGanbatte", "Oni", WS_POPUP | (opt_border ? WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU : 0), re.left, re.top, re.right - re.left, re.bottom - re.top, NULL, NULL, DDrDLLModule, NULL); 92 88 93 89 while (GetMessage(&Msg, NULL, 0, 0) > 0) … … 121 117 re.right = re.left + cx; 122 118 re.bottom = re.top + cy; 123 AdjustWindowRect(&re, WS_POPUP | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU, FALSE);119 AdjustWindowRect(&re, WS_POPUP | (opt_border ? WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU : 0), FALSE); 124 120 125 SetWindowPos(boxhwnd, NULL, re.left, re.top, re.right - re.left, re.bottom - re.top, uFlags | SWP_NOOWNERZORDER); 121 SetWindowPos(boxhwnd, opt_topmost ? HWND_TOPMOST : NULL, re.left, re.top, re.right - re.left, re.bottom - re.top, (opt_topmost ? uFlags & ~SWP_NOZORDER : uFlags | SWP_NOOWNERZORDER)); 122 ShowWindow(boxhwnd, SW_SHOW); 123 UpdateWindow(boxhwnd); 126 124 return SetWindowPos(hWnd, NULL, 0, 0, cx, cy, uFlags | SWP_NOOWNERZORDER); 127 125 }
Note:
See TracChangeset
for help on using the changeset viewer.