29 #include "../../idlib/precompiled.h"
53 #include "dlgcamera.h"
61 #include "../../sys/win32/rc/common_resource.h"
62 #include "../comafx/DialogName.h"
63 #include "../comafx/DialogColorPicker.h"
68 static char THIS_FILE[] = __FILE__;
87 #define D3XP_ID_FILE_SAVE_COPY ( WM_USER + 28476 )
88 #define D3XP_ID_SHOW_MODELS ( WM_USER + 28477 )
96 #define SPEED_MOVE 32.0f
97 #define SPEED_TURN 22.5f
99 #define MAX_GRID 64.0f
100 #define MIN_GRID 0.125f
229 {
"Window_Preferences",
'P', 0,
ID_PREFS },
292 {
"Space", VK_SPACE },
293 {
"Backspace", VK_BACK },
294 {
"Escape", VK_ESCAPE },
296 {
"Insert", VK_INSERT },
297 {
"Delete", VK_DELETE },
298 {
"PageUp", VK_PRIOR },
299 {
"PageDown", VK_NEXT },
303 {
"Right", VK_RIGHT },
317 {
"Return", VK_RETURN },
318 {
"Comma", VK_COMMA },
319 {
"Period", VK_PERIOD },
321 {
"Multiply", VK_MULTIPLY },
322 {
"Subtract", VK_SUBTRACT },
323 {
"NumPad0", VK_NUMPAD0 },
324 {
"NumPad1", VK_NUMPAD1 },
325 {
"NumPad2", VK_NUMPAD2 },
326 {
"NumPad3", VK_NUMPAD3 },
327 {
"NumPad4", VK_NUMPAD4 },
328 {
"NumPad5", VK_NUMPAD5 },
329 {
"NumPad6", VK_NUMPAD6 },
330 {
"NumPad7", VK_NUMPAD7 },
331 {
"NumPad8", VK_NUMPAD8 },
332 {
"NumPad9", VK_NUMPAD9 },
358 ON_COMMAND(ID_FILE_CLOSE, OnFileClose)
361 ON_COMMAND(ID_FILE_NEW, OnFileNew)
362 ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
364 ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
365 ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
366 ON_COMMAND(ID_FILE_SAVE, OnFileSave)
501 ON_COMMAND(ID_EDIT_UNDO, OnEditUndo)
502 ON_COMMAND(ID_EDIT_REDO, OnEditRedo)
503 ON_UPDATE_COMMAND_UI(ID_EDIT_UNDO, OnUpdateEditUndo)
504 ON_UPDATE_COMMAND_UI(ID_EDIT_REDO, OnUpdateEditRedo)
529 ON_UPDATE_COMMAND_UI(ID_FILE_IMPORT, OnUpdateFileImport)
533 ON_UPDATE_COMMAND_UI(ID_FILE_SAVEREGION, OnUpdateFileSaveregion)
624 ON_UPDATE_COMMAND_UI(ID_TEXTURES_SHOWINUSE, OnUpdateTexturesShowinuse)
690 ON_COMMAND_RANGE(CMD_TEXTUREWAD, CMD_TEXTUREWAD_END, OnTextureWad)
691 ON_COMMAND_RANGE(CMD_BSPCOMMAND, CMD_BSPCOMMAND_END, OnBspCommand)
692 ON_COMMAND_RANGE(IDMRU, IDMRU_END, OnMru)
696 ON_REGISTERED_MESSAGE(g_msgBSPDone, OnBSPDone)
697 ON_REGISTERED_MESSAGE(g_msgBSPStatus, OnBSPStatus)
698 ON_MESSAGE(WM_DISPLAYCHANGE, OnDisplayChange)
704 static
UINT indicators[] = {
728 if (::GlobalGetAtomName(static_cast<ATOM>(lParam), buff,
sizeof(buff))) {
730 ::GlobalDeleteAtom(static_cast<ATOM>(lParam));
741 sndPlaySound(str.
c_str(), SND_FILENAME | SND_ASYNC);
777 GetCursorPos(&ptMouse);
781 VERIFY(mnuPopup.LoadMenu(uId));
782 mnuPopup.GetSubMenu(0)->TrackPopupMenu
784 TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON,
789 mnuPopup.DestroyMenu();
807 CMenu *pMenu = GetMenu();
810 pMenu->CheckMenuItem(ID_VIEW_SHOWNAMES, MF_BYCOMMAND | MF_CHECKED);
811 pMenu->CheckMenuItem(ID_VIEW_SHOWCOORDINATES, MF_BYCOMMAND | MF_CHECKED);
812 pMenu->CheckMenuItem(ID_VIEW_SHOWLIGHTS, MF_BYCOMMAND | MF_CHECKED);
813 pMenu->CheckMenuItem(ID_VIEW_SHOWCOMBATNODES, MF_BYCOMMAND | MF_CHECKED);
814 pMenu->CheckMenuItem(ID_VIEW_ENTITY, MF_BYCOMMAND | MF_CHECKED);
815 pMenu->CheckMenuItem(ID_VIEW_SHOWPATH, MF_BYCOMMAND | MF_CHECKED);
816 pMenu->CheckMenuItem(ID_VIEW_SHOWWATER, MF_BYCOMMAND | MF_CHECKED);
817 pMenu->CheckMenuItem(ID_VIEW_SHOWWORLD, MF_BYCOMMAND | MF_CHECKED);
818 pMenu->CheckMenuItem(ID_VIEW_SHOWCLIP, MF_BYCOMMAND | MF_CHECKED);
819 pMenu->CheckMenuItem(ID_VIEW_SHOWTRIGGERS, MF_BYCOMMAND | MF_CHECKED);
820 pMenu->CheckMenuItem(ID_VIEW_SHOWHINT, MF_BYCOMMAND | MF_CHECKED);
821 pMenu->CheckMenuItem(ID_VIEW_SHOWCAULK, MF_BYCOMMAND | MF_CHECKED);
822 pMenu->CheckMenuItem(ID_VIEW_SHOW_SHOWVISPORTALS, MF_BYCOMMAND | MF_CHECKED);
823 pMenu->CheckMenuItem(ID_VIEW_SHOW_NODRAW, MF_BYCOMMAND | MF_CHECKED);
824 pMenu->CheckMenuItem(ID_VIEW_SHOWANGLES, MF_BYCOMMAND | MF_CHECKED);
826 if (!g_qeglobals.d_savedinfo.show_names) {
827 pMenu->CheckMenuItem(ID_VIEW_SHOWNAMES, MF_BYCOMMAND | MF_UNCHECKED);
830 if (!g_qeglobals.d_savedinfo.show_coordinates) {
831 pMenu->CheckMenuItem(ID_VIEW_SHOWCOORDINATES, MF_BYCOMMAND | MF_UNCHECKED);
834 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_LIGHTS) {
835 pMenu->CheckMenuItem(ID_VIEW_SHOWLIGHTS, MF_BYCOMMAND | MF_UNCHECKED);
838 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_COMBATNODES) {
839 pMenu->CheckMenuItem(ID_VIEW_SHOWCOMBATNODES, MF_BYCOMMAND | MF_UNCHECKED);
842 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_ENT) {
843 pMenu->CheckMenuItem(ID_VIEW_ENTITY, MF_BYCOMMAND | MF_UNCHECKED);
846 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_PATHS) {
847 pMenu->CheckMenuItem(ID_VIEW_SHOWPATH, MF_BYCOMMAND | MF_UNCHECKED);
850 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_DYNAMICS) {
851 pMenu->CheckMenuItem(ID_VIEW_SHOWWATER, MF_BYCOMMAND | MF_UNCHECKED);
854 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_WORLD) {
855 pMenu->CheckMenuItem(ID_VIEW_SHOWWORLD, MF_BYCOMMAND | MF_UNCHECKED);
858 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_CLIP) {
859 pMenu->CheckMenuItem(ID_VIEW_SHOWCLIP, MF_BYCOMMAND | MF_UNCHECKED);
862 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_TRIGGERS) {
863 pMenu->CheckMenuItem(ID_VIEW_SHOWTRIGGERS, MF_BYCOMMAND | MF_UNCHECKED);
866 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_HINT) {
867 pMenu->CheckMenuItem(ID_VIEW_SHOWHINT, MF_BYCOMMAND | MF_UNCHECKED);
870 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_CAULK) {
871 pMenu->CheckMenuItem(ID_VIEW_SHOWCAULK, MF_BYCOMMAND | MF_UNCHECKED);
874 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_VISPORTALS) {
875 pMenu->CheckMenuItem(ID_VIEW_SHOW_SHOWVISPORTALS, MF_BYCOMMAND | MF_UNCHECKED);
878 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_NODRAW) {
879 pMenu->CheckMenuItem(ID_VIEW_SHOW_NODRAW, MF_BYCOMMAND | MF_UNCHECKED);
882 if (g_qeglobals.d_savedinfo.exclude & EXCLUDE_ANGLES) {
883 pMenu->CheckMenuItem(ID_VIEW_SHOWANGLES, MF_BYCOMMAND | MF_UNCHECKED);
886 pMenu->CheckMenuItem(ID_TOGGLE_LOCK, MF_BYCOMMAND | (g_PrefsDlg.
m_bTextureLock) ? MF_CHECKED : MF_UNCHECKED);
889 ID_TOGGLE_ROTATELOCK,
890 MF_BYCOMMAND | (g_PrefsDlg.
m_bRotateLock) ? MF_CHECKED : MF_UNCHECKED
894 ID_VIEW_CUBICCLIPPING,
899 ID_VIEW_OPENGLLIGHTING,
900 MF_BYCOMMAND | (g_PrefsDlg.
m_bGLLighting) ? MF_CHECKED : MF_UNCHECKED
902 pMenu->CheckMenuItem(ID_SNAPTOGRID, MF_BYCOMMAND | (!g_PrefsDlg.
m_bNoClamp) ? MF_CHECKED : MF_UNCHECKED);
906 ID_VIEW_CUBICCLIPPING,
935 if (g_qeglobals.d_project_entity) {
939 PlaceMenuMRUItem(g_qeglobals.d_lpMruMenu, ::GetSubMenu(::GetMenu(GetSafeHwnd()), 0), ID_FILE_EXIT);
949 char key[1024], *ptr;
950 MENUITEMINFO MenuItemInfo;
954 memset(&MenuItemInfo, 0,
sizeof(MENUITEMINFO));
955 MenuItemInfo.cbSize =
sizeof(MENUITEMINFO);
956 MenuItemInfo.fMask = MIIM_TYPE;
957 MenuItemInfo.dwTypeData = key;
958 MenuItemInfo.cch =
sizeof(key);
959 if (!pMenu->GetMenuItemInfo(g_Commands[i].
m_nCommand, &MenuItemInfo)) {
963 if (MenuItemInfo.fType != MFT_STRING) {
967 ptr = strchr(key,
'\t');
973 if (g_Commands[i].m_nModifiers) {
974 if (g_Commands[i].m_nModifiers &
RAD_SHIFT) {
975 strcat(key,
"Shift-");
978 if (g_Commands[i].m_nModifiers &
RAD_ALT) {
983 strcat(key,
"Ctrl-");
988 if (g_Commands[i].m_nKey == g_Keys[j].m_nVKKey) {
989 strcat(key, g_Keys[j].m_strName);
994 if (j >= g_nKeyCount) {
995 sprintf(&key[strlen(key)],
"%c", g_Commands[i].m_nKey);
998 memset(&MenuItemInfo, 0,
sizeof(MENUITEMINFO));
999 MenuItemInfo.cbSize =
sizeof(MENUITEMINFO);
1000 MenuItemInfo.fMask = MIIM_TYPE;
1001 MenuItemInfo.fType = MFT_STRING;
1002 MenuItemInfo.dwTypeData = key;
1003 MenuItemInfo.cch = strlen(key);
1004 SetMenuItemInfo(pMenu->m_hMenu, g_Commands[i].
m_nCommand,
FALSE, &MenuItemInfo);
1016 int i =
sizeof(g_qeglobals.d_savedinfo);
1019 g_qeglobals.d_savedinfo.exclude |= (EXCLUDE_HINT | EXCLUDE_CLIP);
1022 int nOldSize = g_qeglobals.d_savedinfo.iSize;
1023 if (g_qeglobals.d_savedinfo.iSize !=
sizeof(g_qeglobals.d_savedinfo)) {
1025 g_qeglobals.d_savedinfo.iSize =
sizeof(g_qeglobals.d_savedinfo);
1026 g_qeglobals.d_savedinfo.fGamma = 1.0;
1028 g_qeglobals.d_savedinfo.m_nTextureTweak = 1.0;
1031 g_qeglobals.d_savedinfo.show_coordinates =
true;
1032 g_qeglobals.d_savedinfo.show_names =
false;
1034 for (i=0 ; i<3 ; i++) {
1035 g_qeglobals.d_savedinfo.colors[COLOR_TEXTUREBACK][
i] = 0;
1036 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBACK][
i] = 1.0;
1037 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMINOR][
i] = 0.75;
1038 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][
i] = 0.5;
1039 g_qeglobals.d_savedinfo.colors[COLOR_CAMERABACK][
i] = 0.25;
1042 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][0] = 0.0;
1043 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][1] = 0.0;
1044 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][2] = 1.0;
1046 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][0] = 0.0;
1047 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][1] = 0.0;
1048 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][2] = 0.0;
1050 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][0] = 1.0;
1051 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][1] = 0.0;
1052 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][2] = 0.0;
1054 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][0] = 0.0;
1055 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][1] = 0.0;
1056 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][2] = 1.0;
1058 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][0] = 0.0;
1059 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][1] = 0.0;
1060 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][2] = 0.0;
1062 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][0] = 0.5;
1063 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][1] = 0.0;
1064 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][2] = 0.75;
1068 if (nOldSize > 0 && nOldSize <
sizeof(g_qeglobals.d_savedinfo)) {
1080 char *pBuffer =
g_strAppPath.GetBufferSetLength(_MAX_PATH + 1);
1081 int nResult = ::GetModuleFileName(
NULL, pBuffer, _MAX_PATH);
1082 ASSERT(nResult != 0);
1088 InitCommonControls();
1089 g_qeglobals.d_hInstance = AfxGetInstanceHandle();
1093 if (CFrameWnd::OnCreate(lpCreateStruct) == -1) {
1099 if (!
m_wndToolBar.CreateEx(
this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
1100 | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !
m_wndToolBar.LoadToolBar(nID)) {
1101 TRACE0(
"Failed to create toolbar\n");
1106 TRACE0(
"Failed to create status bar\n");
1123 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SOUND_SHOWSOUNDVOLUMES,g_qeglobals.d_savedinfo.showSoundAlways);
1124 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SOUND_SHOWSELECTEDSOUNDVOLUMES,g_qeglobals.d_savedinfo.showSoundWhenSelected);
1127 EnableDocking(CBRS_ALIGN_ANY);
1136 g_qeglobals.d_lpMruMenu = CreateMruMenuDefault();
1138 m_bAutoMenuEnable =
FALSE;
1142 CMenu *pMenu = GetMenu();
1145 CFont *pFont =
new CFont();
1146 pFont->CreatePointFont(g_PrefsDlg.
m_nStatusSize * 10,
"Arial");
1172 LoadBarState(
"RadiantToolBars2");
1177 PostMessage(WM_KEYDOWN,
'O',
NULL);
1180 g_qeglobals.d_savedinfo.exclude |= (EXCLUDE_PATHS | EXCLUDE_CLIP | EXCLUDE_CAULK | EXCLUDE_VISPORTALS | EXCLUDE_NODRAW | EXCLUDE_TRIGGERS);
1192 void FindReplace(CString& strContents,
const char* pTag,
const char* pValue) {
1193 if (
strcmp(pTag, pValue) == 0)
1195 for (
int nPos = strContents.Find(pTag); nPos >= 0; nPos = strContents.Find(pTag)) {
1196 int nRightLen = strContents.GetLength() - strlen(pTag) - nPos;
1197 CString strLeft = strContents.Left(nPos);
1198 CString strRight = strContents.Right(nRightLen);
1200 strLeft += strRight;
1201 strContents = strLeft;
1209 strINI +=
"\\radiant.ini";
1212 int nLen = GetPrivateProfileString(
"Commands", g_Commands[
i].m_strCommand,
"", pBuff, 1024, strINI);
1214 CString strBuff = pBuff;
1216 strBuff.TrimRight();
1218 int nSpecial = strBuff.Find(
"+alt");
1220 if (nSpecial >= 0) {
1225 nSpecial = strBuff.Find(
"+ctrl");
1226 if (nSpecial >= 0) {
1231 nSpecial = strBuff.Find(
"+shift");
1232 if (nSpecial >= 0) {
1238 strBuff.TrimRight();
1239 strBuff.MakeUpper();
1241 g_Commands[
i].
m_nKey = __toascii(strBuff.GetAt(0));
1245 if (strBuff.CompareNoCase(g_Keys[
j].
m_strName) == 0) {
1261 return CFrameWnd::PreCreateWindow(cs);
1271 void CMainFrame::AssertValid()
const {
1272 CFrameWnd::AssertValid();
1279 void CMainFrame::Dump(CDumpContext &dc)
const {
1280 CFrameWnd::Dump(dc);
1294 bool bProjectLoaded =
false;
1298 if (!bProjectLoaded) {
1302 if (!bProjectLoaded) {
1303 CFileDialog dlgFile(
true,
NULL,
NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
EDITOR_WINDOWTEXT " Project files (*.qe4, *.prj)|*.qe4|*.prj||",
this );
1304 if (dlgFile.DoModal() == IDOK) {
1305 bProjectLoaded = QE_LoadProject(dlgFile.GetPathName().GetBuffer(0));
1309 if (!bProjectLoaded) {
1310 Error(
"Unable to load project file. It was unavailable in the scripts path and the default could not be found");
1318 SetTimer(QE_TIMER0, 100,
NULL);
1327 return CFrameWnd::OnCommand(wParam, lParam);
1336 return CFrameWnd::DefWindowProc(message, wParam, lParam);
1346 static double oldtime = 0.0;
1349 time = Sys_DoubleTime();
1350 delta = time - oldtime;
1374 return CFrameWnd::WindowProc(message, wParam, lParam);
1382 if (::GetAsyncKeyState(VK_LBUTTON)) {
1386 if (::GetAsyncKeyState(VK_RBUTTON)) {
1390 if (::GetAsyncKeyState(VK_MBUTTON)) {
1403 static bool autoSavePending =
false;
1405 if ( nIDEvent == QE_TIMER0 && !
MouseDown() ) {
1406 QE_CountBrushesAndUpdateStatusBar();
1408 if ( nIDEvent == QE_TIMER1 || autoSavePending ) {
1410 autoSavePending =
true;
1413 if ( Sys_Waiting() ) {
1414 autoSavePending =
true;
1418 autoSavePending =
false;
1433 wp.length =
sizeof(WINDOWPLACEMENT);
1435 LONG lSize =
sizeof(wp);
1437 ::SetWindowPlacement(hwnd, &wp);
1450 wp.length =
sizeof(WINDOWPLACEMENT);
1451 if (::GetWindowPlacement(hwnd, &wp)) {
1461 KillTimer(QE_TIMER0);
1463 SaveBarState(
"RadiantToolBars2");
1468 DeleteMruMenu(g_qeglobals.d_lpMruMenu);
1470 SaveRegistryInfo(
"radiant_SavedInfo", &g_qeglobals.d_savedinfo,
sizeof(g_qeglobals.d_savedinfo));
1482 m_pXYWnd->SendMessage(WM_DESTROY, 0, 0);
1489 m_pYZWnd->SendMessage(WM_DESTROY, 0, 0);
1496 m_pXZWnd->SendMessage(WM_DESTROY, 0, 0);
1503 m_pZWnd->SendMessage(WM_DESTROY, 0, 0);
1510 m_pCamWnd->SendMessage(WM_DESTROY, 0, 0);
1540 g_qeglobals.d_project_entity->epairs.Clear();
1542 entity_t *pEntity = g_qeglobals.d_project_entity->
next;
1543 while (pEntity !=
NULL && pEntity != g_qeglobals.d_project_entity) {
1546 pEntity = pNextEntity;
1565 CFrameWnd::OnDestroy();
1567 AfxGetApp()->ExitInstance();
1575 if (ConfirmModified()) {
1577 CFrameWnd::OnClose();
1589 if (g_Commands[
i].m_nKey == nChar) {
1591 if (g_Commands[
i].m_nModifiers &
RAD_PRESS) {
1595 if (!(GetAsyncKeyState(VK_MENU) & 0x8000)) {
1601 if (!(GetAsyncKeyState(VK_CONTROL) & 0x8000)) {
1607 if (!(GetAsyncKeyState(VK_SHIFT) & 0x8000)) {
1613 if (GetAsyncKeyState(VK_MENU) & 0x8000) {
1617 if (GetAsyncKeyState(VK_CONTROL) & 0x8000) {
1621 if (GetAsyncKeyState(VK_SHIFT) & 0x8000) {
1627 SendMessage(WM_COMMAND, g_Commands[
i].m_nCommand, 0);
1640 if (nKey == VK_UP || nKey == VK_LEFT || nKey == VK_RIGHT || nKey == VK_DOWN) {
1641 if (::GetAsyncKeyState(nKey)) {
1658 if (nChar == VK_DOWN) {
1662 CFrameWnd::OnSysKeyDown(nChar, nRepCnt, nFlags);
1672 if (g_Commands[
i].m_nKey == nChar) {
1674 unsigned int nState = 0;
1675 if (GetAsyncKeyState(VK_MENU) & 0x8000) {
1679 if (GetAsyncKeyState(VK_CONTROL) & 0x8000) {
1683 if (GetAsyncKeyState(VK_SHIFT) & 0x8000) {
1687 if ((g_Commands[
i].m_nModifiers & 0x7) == nState) {
1688 SendMessage(WM_COMMAND, g_Commands[
i].m_nCommand, 0);
1694 CFrameWnd::OnKeyDown(nChar, nRepCnt, nFlags);
1713 r.DeflateRect(0,0,0,1);
1715 r.InflateRect(0,0,0,1);
1722 CRect rect(5, 25, 100, 100);
1724 GetClientRect(rctParent);
1727 m_pCamWnd->Create(CAMERA_WINDOW_CLASS,
"", QE3_CHILDSTYLE, rect,
this, 1234);
1730 m_pZWnd->Create(Z_WINDOW_CLASS,
"", QE3_CHILDSTYLE, rect,
this, 1238);
1733 m_pXYWnd->Create(XY_WINDOW_CLASS,
"", QE3_CHILDSTYLE, rect,
this, 1235);
1737 m_pXZWnd->Create(XY_WINDOW_CLASS,
"", QE3_CHILDSTYLE, rect,
this, 1236);
1741 m_pYZWnd->Create(XY_WINDOW_CLASS,
"", QE3_CHILDSTYLE, rect,
this, 1237);
1785 CFrameWnd::OnSize(nType, cx, cy);
1788 GetClientRect(rctParent);
1795 m_wndStatusBar.SetPaneInfo( 0, nID, nStyle, rctParent.Width() * 0.15f );
1797 m_wndStatusBar.SetPaneInfo( 1, nID, nStyle, rctParent.Width() * 0.15f);
1799 m_wndStatusBar.SetPaneInfo( 2, nID, nStyle, rctParent.Width() * 0.15f );
1801 m_wndStatusBar.SetPaneInfo( 3, nID, nStyle, rctParent.Width() * 0.39f );
1803 m_wndStatusBar.SetPaneInfo( 4, nID, nStyle, rctParent.Width() * 0.15f );
1805 m_wndStatusBar.SetPaneInfo( 5, nID, nStyle, rctParent.Width() * 0.01f );
1838 PostMessage(WM_CLOSE, 0, 0
L);
1846 if (ConfirmModified()) {
1856 if (ConfirmModified()) {
1866 if (ConfirmModified()) {
1876 if (g_qeglobals.d_pointfile_display_list) {
1928 char aFile[260] =
"\0";
1929 char aFilter[260] =
"Map\0*.map\0\0";
1930 char aTitle[260] =
"Save a Copy\0";
1933 memset( &afn, 0,
sizeof(OPENFILENAME) );
1935 CString strPath =
ValueForKey(g_qeglobals.d_project_entity,
"basepath");
1938 if (g_PrefsDlg.
m_strMaps.GetLength() > 0) {
1946 afn.lStructSize =
sizeof(OPENFILENAME);
1947 afn.hwndOwner = g_pParentWnd->GetSafeHwnd();
1948 afn.lpstrFilter = aFilter;
1949 afn.nFilterIndex = 1;
1950 afn.lpstrFile = aFile;
1951 afn.nMaxFile =
sizeof(aFile);
1952 afn.lpstrFileTitle =
NULL;
1953 afn.nMaxFileTitle = 0;
1954 afn.lpstrInitialDir = strPath;
1955 afn.lpstrTitle = aTitle;
1956 afn.Flags = OFN_SHOWHELP | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_OVERWRITEPROMPT;
1959 if (!GetSaveFileName(&afn)) {
1974 g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_MODELS;
2056 char szFileName[128];
2060 GetMenuItem(g_qeglobals.d_lpMruMenu, wId,
TRUE, szFileName,
sizeof(szFileName));
2064 fExist = OpenFile(szFileName ,&of,OF_EXIST) != HFILE_ERROR;
2069 AddNewItem(g_qeglobals.d_lpMruMenu,(LPSTR)szFileName);
2076 DelMenuItem(g_qeglobals.d_lpMruMenu,wId,
TRUE);
2079 PlaceMenuMRUItem(g_qeglobals.d_lpMruMenu,GetSubMenu(GetMenu(hWnd),0),
2087 if (ConfirmModified()) {
2088 DoMru(GetSafeHwnd(), nID);
2136 strcat (name,
".reg");
2145 in = strstr(name,
"maps/");
2147 in = strstr(name,
"maps\\");
2153 if (
idStr::Icmpn(command,
"bspext", strlen(
"runbsp")) == 0) {
2154 PROCESS_INFORMATION ProcessInformation;
2155 STARTUPINFO startupinfo;
2162 paths +=
"+set fs_basepath ";
2166 paths +=
"+set fs_cdpath ";
2170 ::GetModuleFileName(AfxGetApp()->m_hInstance, buff,
sizeof(buff));
2171 if (strlen(command) > strlen(
"bspext")) {
2172 idStr::snPrintf( sys,
sizeof(sys),
"%s %s +set r_fullscreen 0 +dmap editorOutput %s %s +quit", buff, paths.
c_str(), command + strlen(
"bspext"),
in );
2174 idStr::snPrintf( sys,
sizeof(sys),
"%s %s +set r_fullscreen 0 +dmap editorOutput %s +quit", buff, paths.
c_str(),
in );
2177 ::GetStartupInfo (&startupinfo);
2179 common->
Printf(
"Could not start bsp process %s %s/n", buff, sys);
2181 g_pParentWnd->SetFocus();
2184 if (strlen(command) > strlen(
"bsp")) {
2185 idStr::snPrintf( sys,
sizeof(sys),
"dmap %s %s", command + strlen(
"bsp"), in );
2202 RunBsp(bsp_commands[LOWORD(nID - CMD_BSPCOMMAND)]);
2213 g_qeglobals.show_blocks = !(g_qeglobals.show_blocks);
2216 ::GetMenu(GetSafeHwnd()),
2218 MF_BYCOMMAND | (g_qeglobals.show_blocks ? MF_CHECKED : MF_UNCHECKED)
2228 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_CLIP) & EXCLUDE_CLIP) {
2229 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWCLIP, MF_BYCOMMAND | MF_UNCHECKED);
2232 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWCLIP, MF_BYCOMMAND | MF_CHECKED);
2243 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_TRIGGERS) & EXCLUDE_TRIGGERS) {
2244 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWTRIGGERS, MF_BYCOMMAND | MF_UNCHECKED);
2247 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWTRIGGERS, MF_BYCOMMAND | MF_CHECKED);
2258 g_qeglobals.d_savedinfo.show_coordinates ^= 1;
2261 ::GetMenu(GetSafeHwnd()),
2262 ID_VIEW_SHOWCOORDINATES,
2263 MF_BYCOMMAND | (g_qeglobals.d_savedinfo.show_coordinates ? MF_CHECKED : MF_UNCHECKED)
2273 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_ENT) & EXCLUDE_ENT) {
2274 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWENT, MF_BYCOMMAND | MF_UNCHECKED);
2277 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWENT, MF_BYCOMMAND | MF_CHECKED);
2288 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_LIGHTS) & EXCLUDE_LIGHTS) {
2289 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWLIGHTS, MF_BYCOMMAND | MF_UNCHECKED);
2292 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWLIGHTS, MF_BYCOMMAND | MF_CHECKED);
2303 g_qeglobals.d_savedinfo.show_names = !(g_qeglobals.d_savedinfo.show_names);
2306 ::GetMenu(GetSafeHwnd()),
2308 MF_BYCOMMAND | (g_qeglobals.d_savedinfo.show_names ? MF_CHECKED : MF_UNCHECKED)
2319 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_PATHS) & EXCLUDE_PATHS) {
2320 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWPATH, MF_BYCOMMAND | MF_UNCHECKED);
2323 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWPATH, MF_BYCOMMAND | MF_CHECKED);
2334 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_COMBATNODES) & EXCLUDE_COMBATNODES) {
2335 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWCOMBATNODES, MF_BYCOMMAND | MF_UNCHECKED);
2338 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWCOMBATNODES, MF_BYCOMMAND | MF_CHECKED);
2349 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_DYNAMICS) & EXCLUDE_DYNAMICS) {
2350 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWWATER, MF_BYCOMMAND | MF_UNCHECKED);
2353 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWWATER, MF_BYCOMMAND | MF_CHECKED);
2364 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_WORLD) & EXCLUDE_WORLD) {
2365 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWWORLD, MF_BYCOMMAND | MF_UNCHECKED);
2368 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWWORLD, MF_BYCOMMAND | MF_CHECKED);
2472 z.scale *= 5.0f / 4.0f;
2473 if (
z.scale > 4.0f ) {
2485 z.scale *= 4.0f / 5.0f;
2486 if (
z.scale < 0.125f ) {
2503 static void UpdateGrid(
void)
2507 g_qeglobals.d_savedinfo.m_nTextureTweak = g_qeglobals.d_gridsize;
2519 g_qeglobals.d_gridsize = 1;
2522 g_qeglobals.d_gridsize = 2;
2525 g_qeglobals.d_gridsize = 4;
2528 g_qeglobals.d_gridsize = 8;
2531 g_qeglobals.d_gridsize = 16;
2534 g_qeglobals.d_gridsize = 32;
2537 g_qeglobals.d_gridsize = 64;
2540 g_qeglobals.d_gridsize = 0.5f;
2543 g_qeglobals.d_gridsize = 0.25f;
2546 g_qeglobals.d_gridsize = 0.125f;
2578 pCmdUI->SetCheck(texture_showinuse);
2602 float fSave = g_qeglobals.d_savedinfo.fGamma;
2604 if (fSave != g_qeglobals.d_savedinfo.fGamma) {
2605 MessageBox(
"You must restart Q3Radiant for Gamma settings to take place");
2639 if ( g_pParentWnd ) {
2645 COLORREF cr = (
int)(g_qeglobals.d_savedinfo.colors[iIndex][0]*255) +
2646 (((
int)(g_qeglobals.d_savedinfo.colors[iIndex][1]*255))<<8) +
2647 (((
int)(g_qeglobals.d_savedinfo.colors[iIndex][2]*255))<<16);
2653 if ( dlg.DoModal() == IDOK ) {
2654 g_qeglobals.d_savedinfo.colors[iIndex][0] = (dlg.
GetColor() & 255)/255.0;
2655 g_qeglobals.d_savedinfo.colors[iIndex][1] = ((dlg.
GetColor() >> 8)&255)/255.0;
2656 g_qeglobals.d_savedinfo.colors[iIndex][2] = ((dlg.
GetColor() >> 16)&255)/255.0;
2673 if (QE_SingleBrush(
true,
true)) {
2676 if (strColor.GetLength() > 0) {
2678 int n = sscanf(strColor,
"%f %f %f", &fR, &fG, &fB);
2680 g_qeglobals.d_savedinfo.colors[COLOR_ENTITY][0] = fR;
2681 g_qeglobals.d_savedinfo.colors[COLOR_ENTITY][1] = fG;
2682 g_qeglobals.d_savedinfo.colors[COLOR_ENTITY][2] = fB;
2689 sprintf(buffer,
"%f %f %f", g_qeglobals.d_savedinfo.colors[COLOR_ENTITY][0], g_qeglobals.d_savedinfo.colors[COLOR_ENTITY][1],g_qeglobals.d_savedinfo.colors[COLOR_ENTITY][2]);
2710 const int iBufferSize = 4096;
2711 static char sString[8][iBufferSize];
2712 static int iIndex=0;
2714 if (strlen(psString)>=iBufferSize)
2717 common->
Printf(
"String_ToLower(): Warning, input string was %d bytes too large, performing strlwr() inline!\n",strlen(psString)-(iBufferSize-1));
2718 return strlwr(const_cast<char*>(psString));
2721 iIndex = ++ iIndex & 7;
2723 strcpy(sString[iIndex],psString);
2724 strlwr(sString[iIndex]);
2726 return sString[iIndex];
2732 bool bFoundSomething =
false;
2734 brush_t *pLastFoundBrush;
2736 CWaitCursor waitcursor;
2738 Select_Deselect(
true);
2744 if (pPrevFoundBrush && !gbSelectAllMatchingEnts)
2746 brush_t *pPrev =
NULL;
2749 if (pPrev == pPrevFoundBrush && pPrevFoundBrush)
2760 int iBrushesScanned = 0;
2761 int iBrushesSelected=0;
2762 int iEntsScanned = 0;
2764 brush_t* pNextBrush;
2772 pNextBrush =
b->next;
2775 pNextBrush = pNextBrush->next;
2782 static int iDotBodge=0;
2783 if (!(++iDotBodge&15))
2786 bool bMatch =
false;
2797 if (!strFindKey.IsEmpty())
2799 const char *psEntFoundValue =
ValueForKey(ent, strFindKey);
2801 if (strlen(psEntFoundValue)
2806 (gbWholeStringMatchOnly &&
stricmp(psEntFoundValue, strFindValue)==0)
2811 (strFindValue.IsEmpty())
2823 for (
int i=0;
i<iNumEntKeys;
i++)
2826 if (psEntFoundValue)
2828 if ( (strlen(psEntFoundValue) && strFindValue.IsEmpty())
2830 (gbWholeStringMatchOnly &&
stricmp(psEntFoundValue, strFindValue)==0)
2854 bFoundSomething =
true;
2855 pLastFoundEnt = ent;
2856 pLastFoundBrush =
b;
2865 if (!gbSelectAllMatchingEnts)
2870 if (gbSelectAllMatchingEnts)
2872 common->
Printf(
"\nBrushes Selected: %d (Brushes Scanned %d, Ents Scanned %d)\n", iBrushesSelected, iBrushesScanned, iEntsScanned);
2875 if (bFoundSomething)
2879 if (pLastFoundEnt->
origin[0] != 0.0f || pLastFoundEnt->
origin[1] != 0.0f || pLastFoundEnt->
origin[2] != 0.0f)
2887 v3Origin[0] = (pLastFoundBrush->mins[0] + pLastFoundBrush->maxs[0])/2;
2888 v3Origin[1] = (pLastFoundBrush->mins[1] + pLastFoundBrush->maxs[1])/2;
2889 v3Origin[2] = (pLastFoundBrush->mins[2] + pLastFoundBrush->maxs[2])/2;
2909 gpPrevEntBrushFound = pLastFoundBrush;
2912 return bFoundSomething;
2918 CEntKeyFindReplace FindReplace(&strFindKey, &strFindValue, &strReplaceKey, &strReplaceValue, &gbWholeStringMatchOnly, &gbSelectAllMatchingEnts);
2919 switch (FindReplace.DoModal())
2923 brush_t* next =
NULL;
2924 int iOccurences = 0;
2935 const char *psEntFoundValue =
ValueForKey(ent, strFindKey);
2937 if (
stricmp(strFindValue, psEntFoundValue)==0 ||
2938 (strlen(psEntFoundValue) && strFindValue.IsEmpty())
2947 if (!strReplaceKey.IsEmpty() && !strReplaceValue.IsEmpty())
2949 SetKeyValue (ent, strReplaceKey, strReplaceValue);
2957 common->
Printf(
"%d occurence(s) replaced\n",iOccurences);
2967 gpPrevEntBrushFound =
NULL;
2979 gpPrevEntBrushFound =
NULL;
2986 CString psNewCoords =
GetString(
"Input coords (x y z [rot])\n\nUse spaces to seperate numbers");
2987 if (!psNewCoords.IsEmpty())
2992 psNewCoords.Remove(
',');
2993 int iArgsFound = sscanf(psNewCoords,
"%f %f %f",&v3Viewpos[0], &v3Viewpos[1], &v3Viewpos[2]);
2994 if (iArgsFound == 3)
2998 int iArgsFound = sscanf(psNewCoords,
"%f %f %f %f", &v3Viewpos[0], &v3Viewpos[1], &v3Viewpos[2], &fYaw);
2999 if (iArgsFound != 4)
3011 ErrorBox(
va(
"\"%s\" wasn't 3 valid floats with spaces",psNewCoords));
3158 if (
b->owner->eclass->fixedsize) {
3161 a = div((180 - a), 180).rem;
3166 Patch_ToggleInverted();
3181 if (
b->owner->eclass->fixedsize) {
3183 if (a == 0 || a == 180 || a == 360) {
3187 if (a == 90 || a == 270) {
3210 Patch_ToggleInverted();
3223 Patch_ToggleInverted();
3235 Select_RotateAxis(0, 90);
3247 Select_RotateAxis(1, 90);
3259 Select_RotateAxis(2, 90);
3417 if (g_qeglobals.d_select_mode == sel_curvepoint && g_qeglobals.d_num_move_points > 0) {
3418 g_qeglobals.d_num_move_points = 0;
3433 if (g_qeglobals.d_select_mode == sel_edge) {
3434 g_qeglobals.d_select_mode = sel_brush;
3438 SetupVertexSelection();
3439 if (g_qeglobals.d_numpoints) {
3440 g_qeglobals.d_select_mode = sel_edge;
3452 if (g_qeglobals.d_select_mode == sel_vertex || g_qeglobals.d_select_mode == sel_curvepoint) {
3453 g_qeglobals.d_select_mode = sel_brush;
3458 if (OnlyPatchesSelected()) {
3461 else if (!AnyPatchesSelected()) {
3462 SetupVertexSelection();
3463 if (g_qeglobals.d_numpoints) {
3464 g_qeglobals.d_select_mode = sel_vertex;
3479 Select_CenterOrigin();
3493 Select_CompleteTall();
3509 Select_PartialTall();
3575 g_qeglobals.flatRotation++;
3577 if (g_qeglobals.flatRotation > 2) {
3578 g_qeglobals.flatRotation = 0;
3581 if (g_qeglobals.flatRotation) {
3582 g_qeglobals.rotateAxis = 0;
3583 if (
ActiveXY()->GetViewType() == XY) {
3584 g_qeglobals.rotateAxis = 2;
3585 }
else if (
ActiveXY()->GetViewType() == XZ) {
3586 g_qeglobals.rotateAxis = 1;
3589 Select_InitializeRotation();
3599 CFrameWnd::OnSizing(fwSide, pRect);
3627 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_VIEW_CLIPPER);
3665 int nUpdate = (g_PrefsDlg.
m_bCamXYUpdate) ? (W_CAMERA | W_XY) : (W_CAMERA);
3685 int nUpdate = (g_PrefsDlg.
m_bCamXYUpdate) ? (W_CAMERA | W_XY) : (W_CAMERA);
3696 int nUpdate = (g_PrefsDlg.
m_bCamXYUpdate) ? (W_CAMERA | W_XY) : (W_CAMERA);
3707 int nUpdate = (g_PrefsDlg.
m_bCamXYUpdate) ? (W_CAMERA | W_XY) : (W_CAMERA);
3718 int nUpdate = (g_PrefsDlg.
m_bCamXYUpdate) ? (W_CAMERA | W_XY) : (W_CAMERA);
3729 int nUpdate = (g_PrefsDlg.
m_bCamXYUpdate) ? (W_CAMERA | W_XY) : (W_CAMERA);
3747 g_qeglobals.d_showgrid ^= 1;
3758 if (g_PrefsDlg.DoModal() == IDOK) {
3760 MessageBox(
"You need to restart Q3Radiant for the view changes to take place.");
3765 CMenu *pMenu = GetMenu();
3767 pMenu->CheckMenuItem(ID_SNAPTOGRID, MF_BYCOMMAND | (!g_PrefsDlg.
m_bNoClamp) ? MF_CHECKED : MF_UNCHECKED);
3813 if (
m_pZWnd->IsWindowVisible()) {
3828 CMenu *pMenu = GetMenu();
3830 pMenu->CheckMenuItem(ID_TOGGLE_LOCK, MF_BYCOMMAND | (g_PrefsDlg.
m_bTextureLock) ? MF_CHECKED : MF_UNCHECKED);
3870 if (g_qeglobals.flatRotation) {
3871 g_qeglobals.rotateAxis = 0;
3872 if (
ActiveXY()->GetViewType() == XY) {
3873 g_qeglobals.rotateAxis = 2;
3874 }
else if (
ActiveXY()->GetViewType() == XZ) {
3875 g_qeglobals.rotateAxis = 1;
3890 C3DFXCamWnd *pWnd =
new C3DFXCamWnd();
3891 CRect rect(50, 50, 400, 400);
3892 pWnd->Create(_3DFXCAMERA_WINDOW_CLASS,
"", QE3_CHILDSTYLE, rect,
this, 1234);
3893 pWnd->ShowWindow(SW_SHOW);
3911 for (
int n = 0;
n < 6;
n++) {
3923 if (pText && nPane <= 5 && nPane >= 0) {
3939 if (nBits & (W_XY | W_XY_OVERLAY)) {
3953 if (nBits & W_CAMERA || ((nBits & W_CAMERA_IFON) &&
m_bCamPreview)) {
3959 if (nBits & (W_Z | W_Z_OVERLAY)) {
3965 if (nBits & W_TEXTURE) {
3978 else if ( g_pParentWnd ) {
4005 if (g_bPatchBendMode) {
4006 Patch_BendHandleENTER();
4150 for (
int i = 0;
i < 3;
i++) {
4151 g_qeglobals.d_savedinfo.colors[COLOR_TEXTUREBACK][
i] = 0.0f;
4152 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBACK][
i] = 1.0f;
4153 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMINOR][
i] = 0.75f;
4154 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][
i] = 0.5f;
4155 g_qeglobals.d_savedinfo.colors[COLOR_CAMERABACK][
i] = 0.25f;
4158 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][0] = 0.0f;
4159 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][1] = 0.0f;
4160 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][2] = 1.0f;
4162 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][0] = 0.0f;
4163 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][1] = 0.0f;
4164 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][2] = 0.0f;
4166 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][0] = 1.0f;
4167 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][1] = 0.0f;
4168 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][2] = 0.0f;
4170 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][0] = 0.0f;
4171 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][1] = 0.0f;
4172 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][2] = 1.0f;
4174 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][0] = 0.0f;
4175 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][1] = 0.0f;
4176 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][2] = 0.0f;
4178 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][0] = 0.5f;
4179 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][1] = 0.0f;
4180 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][2] = 0.75f;
4182 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][0] = 1.0;
4183 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][1] = 0.0;
4184 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][2] = 1.0;
4194 for (
int i = 0;
i < 3;
i++) {
4195 g_qeglobals.d_savedinfo.colors[COLOR_TEXTUREBACK][
i] = 0.0f;
4196 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBACK][
i] = 1.0f;
4197 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMINOR][
i] = 1.0f;
4198 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][
i] = 0.5f;
4199 g_qeglobals.d_savedinfo.colors[COLOR_CAMERABACK][
i] = 0.25f;
4202 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][0] = 0.0f;
4203 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][1] = 0.0f;
4204 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][2] = 1.0f;
4206 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][0] = 0.0f;
4207 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][1] = 0.0f;
4208 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][2] = 0.0f;
4210 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][0] = 1.0f;
4211 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][1] = 0.0f;
4212 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][2] = 0.0f;
4214 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][0] = 0.0f;
4215 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][1] = 0.0f;
4216 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][2] = 1.0f;
4218 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][0] = 0.0f;
4219 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][1] = 0.0f;
4220 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][2] = 0.0f;
4222 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][0] = 0.5f;
4223 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][1] = 0.0f;
4224 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][2] = 0.75f;
4226 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][0] = 1.0;
4227 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][1] = 0.0;
4228 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][2] = 1.0;
4236 g_qeglobals.d_savedinfo.colors[COLOR_TEXTUREBACK][0] = 0.0f;
4237 g_qeglobals.d_savedinfo.colors[COLOR_TEXTUREBACK][1] = 0.0f;
4238 g_qeglobals.d_savedinfo.colors[COLOR_TEXTUREBACK][2] = 0.0f;
4239 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBACK][0] = 0.35f;
4240 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBACK][1] = 0.35f;
4241 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBACK][2] = 0.35f;
4242 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][0] = 0.5f;
4243 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][1] = 0.5f;
4244 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][2] = 0.5f;
4245 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMINOR][0] = 0.39f;
4246 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMINOR][1] = 0.39f;
4247 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMINOR][2] = 0.39f;
4248 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][0] = 0.0f;
4249 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][1] = 0.0f;
4250 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][2] = 0.0f;
4251 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][0] = 0.0f;
4252 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][1] = 0.0f;
4253 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][2] = 0.0f;
4254 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][0] = 1.0f;
4255 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][1] = 0.90f;
4256 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][2] = 0.90f;
4257 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][0] = 0.5f;
4258 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][1] = 0.0f;
4259 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][2] = 0.74f;
4270 for (
int i = 0;
i < 3;
i++) {
4271 g_qeglobals.d_savedinfo.colors[COLOR_TEXTUREBACK][
i] = 0.0f;
4272 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBACK][
i] = 0.0f;
4273 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMINOR][
i] = 0.0f;
4274 g_qeglobals.d_savedinfo.colors[COLOR_CAMERABACK][
i] = 0.25f;
4277 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][0] = 0.3f;
4278 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][1] = 0.5f;
4279 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][2] = 0.5f;
4281 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][0] = 0.0f;
4282 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][1] = 0.0f;
4283 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][2] = 1.0f;
4285 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][0] = 1.0f;
4286 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][1] = 1.0f;
4287 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][2] = 1.0f;
4289 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][0] = 1.0f;
4290 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][1] = 0.0f;
4291 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][2] = 0.0f;
4293 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][0] = 0.0f;
4294 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][1] = 0.0f;
4295 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][2] = 1.0f;
4297 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][0] = 1.0f;
4298 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][1] = 1.0f;
4299 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][2] = 1.0f;
4301 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][0] = 0.7f;
4302 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][1] = 0.7f;
4303 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][2] = 0.0f;
4305 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][0] = 1.0;
4306 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][1] = 0.0;
4307 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][2] = 1.0;
4313 for (
int i=0 ;
i<3 ;
i++) {
4314 g_qeglobals.d_savedinfo.colors[COLOR_TEXTUREBACK][
i] = 0.25f;
4315 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBACK][
i] = 0.77f;
4316 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMINOR][
i] = 0.83f;
4317 g_qeglobals.d_savedinfo.colors[COLOR_GRIDMAJOR][
i] = 0.89f;
4318 g_qeglobals.d_savedinfo.colors[COLOR_CAMERABACK][
i] = 0.25f;
4321 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][0] = 1.0f;
4322 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][1] = 1.0f;
4323 g_qeglobals.d_savedinfo.colors[COLOR_GRIDBLOCK][2] = 1.0f;
4324 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][0] = 0.0f;
4325 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][1] = 0.0f;
4326 g_qeglobals.d_savedinfo.colors[COLOR_GRIDTEXT][2] = 0.0f;
4327 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][0] = 1.0f;
4328 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][1] = 0.0f;
4329 g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES][2] = 0.0f;
4330 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][0] = 0.0f;
4331 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][1] = 0.0f;
4332 g_qeglobals.d_savedinfo.colors[COLOR_CLIPPER][2] = 1.0f;
4333 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][0] = 0.0f;
4334 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][1] = 0.0f;
4335 g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES][2] = 0.0f;
4336 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][0] = 0.5f;
4337 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][1] = 0.0f;
4338 g_qeglobals.d_savedinfo.colors[COLOR_VIEWNAME][2] = 0.75f;
4344 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][0] = 1.0f;
4345 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][1] = 0.0f;
4346 g_qeglobals.d_savedinfo.colors[COLOR_PRECISION_CROSSHAIR][2] = 1.0f;
4360 CMenu *pMenu = GetMenu();
4362 pMenu->CheckMenuItem(ID_SNAPTOGRID, MF_BYCOMMAND | (!g_PrefsDlg.
m_bNoClamp) ? MF_CHECKED : MF_UNCHECKED);
4376 if (dlg.DoModal() == IDOK) {
4382 common->
Printf(
"Warning.. Tried to scale by a zero value.");
4407 if (
ActiveXY()->SetRotateMode(
true)) {
4408 g_qeglobals.rotateAxis = 0;
4409 if (
ActiveXY()->GetViewType() == XY) {
4410 g_qeglobals.rotateAxis = 2;
4411 }
else if (
ActiveXY()->GetViewType() == XZ) {
4412 g_qeglobals.rotateAxis = 1;
4486 g_qeglobals.d_savedinfo.m_nTextureTweak -= 1.0f;
4487 if ( g_qeglobals.d_savedinfo.m_nTextureTweak == 0.0f ) {
4488 g_qeglobals.d_savedinfo.m_nTextureTweak -= 1.0f;
4499 Select_FitTexture( 1.0
f, 1.0
f );
4507 g_qeglobals.d_savedinfo.m_nTextureTweak += 1.0f;
4508 if ( g_qeglobals.d_savedinfo.m_nTextureTweak == 0.0f ) {
4509 g_qeglobals.d_savedinfo.m_nTextureTweak += 1.0f;
4536 Select_ScaleTexture(0, -g_qeglobals.d_savedinfo.m_nTextureTweak);
4544 Select_ScaleTexture(0, g_qeglobals.d_savedinfo.m_nTextureTweak);
4552 Select_ScaleTexture(g_qeglobals.d_savedinfo.m_nTextureTweak, 0);
4560 Select_ScaleTexture(g_qeglobals.d_savedinfo.m_nTextureTweak, 0);
4568 Select_ShiftTexture(0, -g_qeglobals.d_savedinfo.m_nTextureTweak,
true);
4576 Select_ShiftTexture(-g_qeglobals.d_savedinfo.m_nTextureTweak, 0,
true);
4584 Select_ShiftTexture(g_qeglobals.d_savedinfo.m_nTextureTweak, 0,
true);
4592 Select_ShiftTexture(0, g_qeglobals.d_savedinfo.m_nTextureTweak,
true);
4600 HMENU hMenu = ::GetMenu(GetSafeHwnd());
4601 CheckMenuItem(hMenu,
ID_GRID_1, MF_BYCOMMAND | MF_UNCHECKED);
4602 CheckMenuItem(hMenu,
ID_GRID_2, MF_BYCOMMAND | MF_UNCHECKED);
4603 CheckMenuItem(hMenu,
ID_GRID_4, MF_BYCOMMAND | MF_UNCHECKED);
4604 CheckMenuItem(hMenu,
ID_GRID_8, MF_BYCOMMAND | MF_UNCHECKED);
4605 CheckMenuItem(hMenu,
ID_GRID_16, MF_BYCOMMAND | MF_UNCHECKED);
4606 CheckMenuItem(hMenu,
ID_GRID_32, MF_BYCOMMAND | MF_UNCHECKED);
4607 CheckMenuItem(hMenu, ID_GRID_64, MF_BYCOMMAND | MF_UNCHECKED);
4608 CheckMenuItem(hMenu,
ID_GRID_POINT5, MF_BYCOMMAND | MF_UNCHECKED);
4611 CheckMenuItem(hMenu, ID_GRID_POINT0625, MF_BYCOMMAND | MF_UNCHECKED);
4612 CheckMenuItem(hMenu,
id, MF_BYCOMMAND | MF_CHECKED);
4620 if (g_qeglobals.d_gridsize >=
MAX_GRID) {
4624 g_qeglobals.d_gridsize *= 2.0f;
4629 while (minGrid < g_qeglobals.d_gridsize &&
id <
ID_GRID_END) {
4646 if (g_qeglobals.d_gridsize <=
MIN_GRID) {
4650 g_qeglobals.d_gridsize /= 2;
4655 while (maxGrid > g_qeglobals.d_gridsize &&
id >
ID_GRID_START) {
4679 "G:%1.2f T:%1.2f R:%i C:%i L:%c%c",
4680 g_qeglobals.d_gridsize,
4681 g_qeglobals.d_savedinfo.m_nTextureTweak,
4719 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SCALELOCKX);
4734 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SCALELOCKY);
4749 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SCALELOCKZ);
4777 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SELECT_MOUSESCALE);
4794 DoProjectSettings();
4802 pCmdUI->Enable(
FALSE);
4842 CMenu *pMenu = GetMenu();
4844 pMenu->CheckMenuItem
4846 ID_VIEW_CUBICCLIPPING,
4882 vAmt[0] = vAmt[1] = 0.0f;
4883 vAmt[2] = -g_qeglobals.d_gridsize;
4897 vAmt[0] = vAmt[1] = 0.0f;
4898 vAmt[2] = g_qeglobals.d_gridsize;
4945 if (::GetAsyncKeyState(
'Q')) {
4981 char *
p = strPath.GetBuffer(MAX_PATH + 1);
4982 bi.hwndOwner = GetSafeHwnd();
4984 bi.pszDisplayName =
p;
4985 bi.lpszTitle =
"Load textures from path";
4991 LPITEMIDLIST pidlBrowse;
4992 pidlBrowse = SHBrowseForFolder(&bi);
4994 SHGetPathFromIDList(pidlBrowse, p);
4995 strPath.ReleaseBuffer();
5007 g_qeglobals.flatRotation =
false;
5008 g_qeglobals.rotateAxis++;
5009 if (g_qeglobals.rotateAxis > 2) {
5010 g_qeglobals.rotateAxis = 0;
5012 Select_InitializeRotation();
5085 CFileDialog dlgFile(
TRUE,
NULL,
NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Map files (*.map)|*.map||",
this);
5086 if (dlgFile.DoModal() == IDOK) {
5096 CFileDialog dlgFile(
FALSE,
"map",
NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"Map files (*.map)|*.map||",
this);
5097 if (dlgFile.DoModal() == IDOK) {
5107 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_CURVES) & EXCLUDE_CURVES) {
5108 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWCURVES, MF_BYCOMMAND | MF_UNCHECKED);
5111 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWCURVES, MF_BYCOMMAND | MF_CHECKED);
5156 if (
ActiveXY()->GetViewType() == XY) {
5163 if (nDirection == 2 || nDirection == 3) {
5167 float fDeg = -fAmount;
5174 "Rotation x:: %.1f y:: %.1f z:: %.1f",
5180 Select_RotateAxis(nAxis, fDeg,
false,
true);
5183 else if (
ActiveXY()->ScaleMode()) {
5184 if (nDirection == 0 || nDirection == 3) {
5189 v[0] = v[1] = v[2] = 1.0f;
5212 if (nDirection == 0) {
5216 else if (nDirection == 1) {
5219 else if (nDirection == 2) {
5227 Nudge(nDim, fAmount);
5236 return CFrameWnd::PreTranslateMessage(pMsg);
5245 vMove[0] = vMove[1] = vMove[2] = 0;
5246 vMove[nDim] = fNudge;
5247 Select_Move(vMove,
true);
5268 ID_SELECT_BYBOUNDINGBRUSH,
5291 CRect rect(100, 100, 300, 300);
5292 pCam->Create(CAMERA_WINDOW_CLASS,
"", WS_OVERLAPPEDWINDOW, rect, GetDesktopWindow(), 12345);
5293 pCam->ShowWindow(SW_SHOW);
5316 g_bPatchShowBounds ^= 1;
5317 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_PATCH_SHOWBOUNDINGBOX, (g_bPatchShowBounds) ?
TRUE :
FALSE);
5326 g_bPatchWireFrame ^= 1;
5338 Patch_BrushToMesh(
true);
5351 Patch_BrushToMesh(
false);
5374 Patch_BrushToMesh(
false,
true,
false);
5387 Patch_BrushToMesh(
false,
false,
true);
5414 g_bPatchDrillDown ^= 1;
5428 Patch_AdjustSelected(
true,
true,
true);
5443 Patch_AdjustSelected(
true,
false,
true);
5456 Patch_AdjustSelected(
false,
true,
true);
5469 Patch_AdjustSelected(
false,
false,
true);
5482 Patch_AdjustSelected(
true,
true,
true);
5495 Patch_AdjustSelected(
true,
false,
true);
5508 Patch_AdjustSelected(
true,
true,
false);
5521 Patch_AdjustSelected(
true,
false,
false);
5532 Patch_ToggleInverted();
5542 Select_FlipTexture(
false);
5552 Select_FlipTexture(
true);
5563 Patch_AdjustSelected(
false,
true,
true);
5576 Patch_AdjustSelected(
false,
false,
true);
5589 Patch_AdjustSelected(
false,
true,
false);
5602 Patch_AdjustSelected(
false,
false,
false);
5623 Patch_InsDelToggle();
5641 if (g_bPatchBendMode) {
5642 Patch_BendHandleTAB();
5644 else if (g_bPatchInsertMode) {
5645 Patch_InsDelHandleTAB();
5649 if (faceCount > 0) {
5653 if ( *ip >= selFace->face_winding->GetNumPoints() ) {
5666 if (
idStr::Icmp(b->owner->eclass->name,
"worldspawn") != 0 ) {
5681 Select_Brush(b2,
false);
5694 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_PATCH_INSDEL, (g_bPatchInsertMode) ?
TRUE : FALSE);
5705 Patch_BrushToMesh(
false);
5722 Patch_BrushToMesh(
false);
5747 Patch_CapCurrent(
true);
5756 Patch_CapCurrent(
false,
true);
5765 Patch_DisperseColumns();
5774 Patch_DisperseRows();
5783 Patch_NaturalizeSelected();
5792 Patch_NaturalizeSelected(
false,
false,
true);
5801 Select_SnapToGrid();
5813 Patch_BrushToMesh(
false,
false,
false,
true);
5825 CMenu *pMenu = GetMenu();
5827 pMenu->CheckMenuItem(ID_TEXTURES_TEXTUREWINDOWSCALE_10, MF_BYCOMMAND | MF_UNCHECKED);
5828 pMenu->CheckMenuItem(ID_TEXTURES_TEXTUREWINDOWSCALE_25, MF_BYCOMMAND | MF_UNCHECKED);
5829 pMenu->CheckMenuItem(ID_TEXTURES_TEXTUREWINDOWSCALE_50, MF_BYCOMMAND | MF_UNCHECKED);
5830 pMenu->CheckMenuItem(ID_TEXTURES_TEXTUREWINDOWSCALE_100, MF_BYCOMMAND | MF_UNCHECKED);
5831 pMenu->CheckMenuItem(ID_TEXTURES_TEXTUREWINDOWSCALE_200, MF_BYCOMMAND | MF_UNCHECKED);
5832 pMenu->CheckMenuItem(
id, MF_BYCOMMAND | MF_CHECKED);
5901 Patch_ClearOverlays();
5910 Patch_SetOverlays();
5923 if ( dlg.DoModal() == IDOK ) {
5937 Patch_NaturalizeSelected(
true,
true);
5942 Patch_NaturalizeSelected(
true,
true,
true);
5970 CMenu *pMenu = GetMenu();
5972 pMenu->CheckMenuItem(ID_VIEW_ENTITIESAS_WIREFRAME, MF_BYCOMMAND | (g_PrefsDlg.
m_nEntityShowState == ENTITY_WIRE) ? MF_CHECKED : MF_UNCHECKED);
5973 pMenu->CheckMenuItem(ID_VIEW_ENTITIESAS_SKINNED, MF_BYCOMMAND | (g_PrefsDlg.
m_nEntityShowState == ENTITY_SKINNED) ? MF_CHECKED : MF_UNCHECKED);
6012 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_HINT) & EXCLUDE_HINT) {
6013 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWHINT, MF_BYCOMMAND | MF_UNCHECKED);
6016 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWHINT, MF_BYCOMMAND | MF_CHECKED);
6051 ::GetMenu(GetSafeHwnd()),
6052 ID_VIEW_OPENGLLIGHTING,
6053 MF_BYCOMMAND | (g_PrefsDlg.
m_bGLLighting) ? MF_CHECKED : MF_UNCHECKED
6071 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_CAULK) & EXCLUDE_CAULK) {
6072 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWCAULK, MF_BYCOMMAND | MF_UNCHECKED);
6075 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWCAULK, MF_BYCOMMAND | MF_CHECKED);
6094 Patch_UnFreeze(
false);
6102 Patch_UnFreeze(
true);
6118 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_ANGLES) & EXCLUDE_ANGLES) {
6119 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWANGLES, MF_BYCOMMAND | MF_UNCHECKED);
6122 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOWANGLES, MF_BYCOMMAND | MF_CHECKED);
6138 OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
6139 "Prefab files (*.pfb)|*.pfb||",
6143 ::GetCurrentDirectory(1024, CurPath);
6145 dlgFile.m_ofn.lpstrInitialDir = CurPath;
6146 if (dlgFile.DoModal() == IDOK) {
6161 OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
6162 "Prefab files (*.pfb)|*.pfb||",
6166 ::GetCurrentDirectory(1024, CurPath);
6167 dlgFile.m_ofn.lpstrInitialDir = CurPath;
6168 if (dlgFile.DoModal() == IDOK) {
6181 Patch_BrushToMesh(
false,
true,
false,
true);
6196 Patch_BrushToMesh(
false,
false,
true,
true);
6211 DoSides(
false,
true);
6247 Select_ShowAllHidden();
6315 CFrameWnd::OnActivate(nState, pWndOther, bMinimized);
6317 if ( nState != WA_INACTIVE ) {
6336 g_qeglobals.d_select_mode = sel_addpoint;
6376 long start = GetTickCount();
6380 long msecs = cycle * 1000;
6381 long current =
start;
6385 while (current < start + msecs) {
6391 current = GetTickCount();
6416 g_qeglobals.d_select_mode = sel_addpoint;
6426 g_qeglobals.d_select_mode = sel_addpoint;
6436 g_qeglobals.d_select_mode = sel_addpoint;
6492 if (g_qeglobals.d_select_count < 2) {
6493 Sys_Status(
"Must have at least two things selected.", 0);
6498 entity_t *e1 = g_qeglobals.d_select_order[0]->owner;
6501 Sys_Status(
"First selection must not be world.", 0);
6509 if (e1->
eclass->nShowFlags & ECLASS_LIGHT) {
6513 e1->
brushes.onext->trackLightOrigin =
true;
6521 sprintf(str,
"%g %g %g %g %g %g %g %g %g", mat[0][0], mat[0][1], mat[0][2], mat[1][0], mat[1][1], mat[1][2], mat[2][0], mat[2][1], mat[2][2]);
6526 bool setModel =
true;
6528 if (
b->owner != e1) {
6529 if (e1->
eclass->nShowFlags & ECLASS_LIGHT) {
6531 e1->
origin =
b->owner->origin;
6536 mat =
b->owner->rotation;
6537 sprintf(str,
"%g %g %g %g %g %g %g %g %g", mat[0][0], mat[0][1], mat[0][2], mat[1][0], mat[1][1], mat[1][2], mat[2][0], mat[2][1], mat[2][2]);
6540 if (
b->modelHandle) {
6544 b->entityModel =
true;
6557 Select_Brush(g_qeglobals.d_select_order[0]);
6561 extern void Patch_Weld(patchMesh_t *
p, patchMesh_t *p2);
6563 patchMesh_t *
p, *p2;
6569 }
else if (p2 ==
NULL) {
6580 int show = ::IsWindowVisible(
win32.
hWnd) ? SW_HIDE : SW_NORMAL;
6581 if (show == SW_NORMAL) {
6590 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_RENDERMODE, MF_BYCOMMAND | (
m_pCamWnd->
GetRenderMode()) ? MF_CHECKED : MF_UNCHECKED);
6606 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_REALTIMEREBUILD, MF_BYCOMMAND | (
m_pCamWnd->
GetRebuildMode()) ? MF_CHECKED : MF_UNCHECKED);
6613 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_RENDERENTITYOUTLINES, MF_BYCOMMAND | (
m_pCamWnd->
GetEntityMode()) ? MF_CHECKED : MF_UNCHECKED);
6620 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_MATERIALANIMATION, MF_BYCOMMAND | (
m_pCamWnd->
GetAnimationMode()) ? MF_CHECKED : MF_UNCHECKED);
6629 if (faceCount > 0) {
6630 for (
int i = 0;
i < faceCount;
i++) {
6643 if (faceCount > 0) {
6644 for (
int i = 0;
i < faceCount;
i++) {
6657 if (faceCount > 0) {
6678 Select_WireFrame(
false );
6682 Select_WireFrame(
true );
6686 Select_ForceVisible(
true );
6690 Select_ForceVisible(
false );
6697 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_RENDERSELECTION, MF_BYCOMMAND | (
m_pCamWnd->
GetSelectMode()) ? MF_CHECKED : MF_UNCHECKED);
6709 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_VISPORTALS) & EXCLUDE_VISPORTALS) {
6710 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOW_SHOWVISPORTALS, MF_BYCOMMAND | MF_UNCHECKED);
6713 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOW_SHOWVISPORTALS, MF_BYCOMMAND | MF_CHECKED);
6721 if ((g_qeglobals.d_savedinfo.exclude ^= EXCLUDE_NODRAW) & EXCLUDE_NODRAW) {
6722 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOW_NODRAW, MF_BYCOMMAND | MF_UNCHECKED);
6725 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_SHOW_NODRAW, MF_BYCOMMAND | MF_CHECKED);
6736 CheckMenuItem(::GetMenu(GetSafeHwnd()), ID_VIEW_RENDERSOUND, MF_BYCOMMAND | (
m_pCamWnd->
GetSoundMode()) ? MF_CHECKED : MF_UNCHECKED);
6743 g_qeglobals.d_savedinfo.showSoundAlways ^= 1;
6744 if (g_qeglobals.d_savedinfo.showSoundAlways) {
6745 g_qeglobals.d_savedinfo.showSoundWhenSelected =
false;
6747 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SOUND_SHOWSOUNDVOLUMES,g_qeglobals.d_savedinfo.showSoundAlways);
6748 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SOUND_SHOWSELECTEDSOUNDVOLUMES,g_qeglobals.d_savedinfo.showSoundWhenSelected);
6756 idStr temp =
va(
"%i 3 ", num);
6757 for (
int i = 0;
i <
num;
i++) {
6761 if (OpenClipboard()) {
6765 clip = ::GlobalAlloc(GMEM_DDESHARE, temp.
Length()+1);
6766 buff = (
char*)::GlobalLock(clip);
6768 ::GlobalUnlock(clip);
6769 ::SetClipboardData(CF_TEXT, clip);
6779 g_qeglobals.d_savedinfo.showSoundWhenSelected ^= 1;
6780 if (g_qeglobals.d_savedinfo.showSoundWhenSelected) {
6781 g_qeglobals.d_savedinfo.showSoundAlways =
false;
6783 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SOUND_SHOWSOUNDVOLUMES,g_qeglobals.d_savedinfo.showSoundAlways);
6784 m_wndToolBar.GetToolBarCtrl().CheckButton(ID_SOUND_SHOWSELECTEDSOUNDVOLUMES,g_qeglobals.d_savedinfo.showSoundWhenSelected);
6790 Select_AllTargets();
6813 Select_Brush ( b ,
false );
6838 idStr mtrName,mtrFileName;
6843 common->
Printf (
"Generating list of active materials...\n" );
6847 mtrName =
b->pPatch->d_texture->GetName();
6848 if ( !mtrList.
Find( mtrName) ) {
6849 mtrList.
Insert ( mtrName );
6854 for ( face_t*
f =
b->brush_faces ;
f !=
NULL ;
f=
f->next)
6856 mtrName =
f->d_texture->GetName();
6857 if ( !mtrList.
Find( mtrName) ) {
6858 mtrList.
Insert ( mtrName );
6866 for (
int i = 0 ;
i < mtrList.
Num() ;
i++ ) {
6874 common->
Printf (
"Done...found %i unique materials\n" , mtrList.
Num());
6875 mtrFileName = mtrFileName +
idStr (
"_Materials.txt" );
#define ID_CURVE_DELETE_FIRSTCOLUMN
CMainFrame * g_pParentWnd
afx_msg void OnMiscSelectentitycolor()
bool FilterBrush(brush_t *pb)
#define ID_POPUP_NEWCAMERA_SPLINE
#define ID_COLORS_GRIDTEXT
afx_msg void OnCurveDecreaseHorz()
#define ID_TEXTURES_SHOWALL
afx_msg void OnViewUpfloor()
void SaveAsDialog(bool bRegion)
void Brush_Print(brush_t *b)
#define ID_SELECTION_COMBINE
afx_msg void OnMiscNextleakspot()
afx_msg void OnColorsXybk()
#define ID_VIEW_RENDERSOUND
#define ID_CAMERA_FORWARD
static int snPrintf(char *dest, int size, const char *fmt,...) id_attribute((format(printf
#define ID_SELECTION_TOGGLESIZEPAINT
void Nudge(int nDim, float fNudge)
void UpdateEntitySel(eclass_t *ent)
#define ID_SELECTION_CLONE
void RunBsp(const char *command)
void SetStatusText(int nPane, const char *pText)
void Undo_AddBrushList(brush_t *brushlist)
#define ID_VIEW_HIDESHOW_HIDESELECTED
afx_msg void OnSelectionWireFrameOff()
void WINAPI Sys_UpdateWindows(int nBits)
afx_msg void OnViewHideshowShowhidden()
afx_msg void OnColorSetSuperMal()
void CyclePrecisionCrosshairMode()
type GetValue(const int index) const
void UpdateRadiantColor(float r, float g, float b, float a)
afx_msg void OnViewDownfloor()
afx_msg void OnToggleToolbar()
#define ID_VIEW_ENTITIESAS_SKINNED
afx_msg void OnSelectionTextureShiftleft()
afx_msg void OnViewShowangles()
#define ID_CURVE_PATCHDENSETUBE
afx_msg void OnSelectByBoundingBrush()
void showCameraInspector()
afx_msg void OnColorSetMax()
#define ID_SELECTION_TEXTURE_INC
assert(prefInfo.fullscreenBtn)
#define ID_CURVE_INVERTCURVE
afx_msg void OnToggleLock()
afx_msg void OnSelectionSelectpartialtall()
afx_msg void OnCameraBack()
afx_msg void OnGridToggle()
#define ID_TOGGLE_ROTATELOCK
idCVarSystem * cvarSystem
#define ID_CURVE_INSERT_ADDCOLUMN
afx_msg void OnFileOpen()
afx_msg void OnPatchInspector()
afx_msg void OnFileClose()
#define ID_SELECTION_CENTER_ORIGIN
#define ID_CURVE_CAP_INVERTEDENDCAP
afx_msg void OnSplinesPopup()
#define ID_MISC_SELECTENTITYCOLOR
afx_msg void OnTexturesHideall()
#define ID_TEXTURES_HIDEALL
#define ID_PATCH_INSPECTOR
#define ID_SELECTION_VIEW_WIREFRAMEON
SCommandInfo g_Commands[]
#define ID_SELECTION_CSGMERGE
#define D3XP_ID_FILE_SAVE_COPY
afx_msg void OnCurveBevel()
afx_msg void OnSoundShowselectedsoundvolumes()
void Brush_MakeSided(int sides)
#define ID_TEXTURES_SHADERS_SHOW
afx_msg void OnBrushPrimitivesSphere()
#define ID_SELECT_BYBOUNDINGBRUSH
afx_msg void OnViewShowhint()
void Map_BuildBrushData(void)
#define ID_SPLINES_EDITPOINTS
afx_msg void OnCurveNegativeTextureY()
afx_msg void OnCurveDeleteLastcolumn()
afx_msg void OnTexturesReloadshaders()
#define ID_SOUND_SHOWSOUNDVOLUMES
#define ID_VIEW_SHOWANGLES
void SetActiveXY(CXYWnd *p)
#define ID_MATERIALS_GENERATEMATERIALSLIST
#define ID_VIEW_CAMERAUPDATE
afx_msg void ToggleCamera()
#define ID_COLORS_SELECTEDBRUSH
afx_msg void OnCameraUp()
void Pointfile_Next(void)
afx_msg void OnViewShowpath()
#define ID_TEXTURE_REPLACEALL
void Entity_Free(entity_t *e)
CONST PIXELFORMATDESCRIPTOR UINT
afx_msg void OnViewZoomin()
afx_msg void OnSelectionTextureFit()
#define ID_VIEW_SHOWWATER
afx_msg void OnSelectionTextureScaleLeft()
#define ID_CURVE_CYCLECAP
afx_msg void OnToggleview()
afx_msg void OnSize(UINT nType, int cx, int cy)
afx_msg void OnSelectionSelectNudgedown()
afx_msg void OnCurveNegativeTextureX()
#define ID_CURVE_MOREENDCAPSBEVELS_SQUAREENDCAP
#define ID_CURVE_DELETECOLUMN
afx_msg void OnSelectionExportToCM()
afx_msg void OnSelectionExportToobj()
afx_msg void OnCameraAngleup()
#define ID_VIEW_HIDESHOW_SHOWHIDDEN
void Entity_UnlinkBrush(brush_t *b)
afx_msg void OnTexturesShowinuse()
afx_msg void OnViewClipper()
#define ID_VIEW_RENDERENTITYOUTLINES
afx_msg void OnCurveInsertInsertrow()
#define ID_FILE_POINTFILE
#define ID_SELECTION_EXPORT_TOCM
afx_msg void OnSelectBrushesOnly()
afx_msg void OnViewShowblocks()
#define ID_EDIT_COPYBRUSH
afx_msg void OnCurveSimplepatchmesh()
afx_msg void OnCurveInsertrow()
#define ID_BRUSH_ARBITRARYSIDED
int Undo_RedoAvailable(void)
#define ID_TEXTURES_FLATSHADE
afx_msg void OnMiscFindbrush()
afx_msg void OnSelectCompleteEntity()
afx_msg void OnHelpCommandlist()
void WINAPI Pointfile_Check(void)
afx_msg void OnSelectBrushlight()
#define ID_CURVE_CYLINDER
#define ID_VIEW_SHOW_SHOWVISPORTALS
#define ID_SELECTION_EXPORT_TOOBJ
afx_msg void OnViewNearest(unsigned int nID)
afx_msg void OnFileNewproject()
afx_msg void OnSelectionPrint()
afx_msg void OnToggleviewYz()
#define ID_SELECTION_DRAGEDGES
afx_msg void OnFilePrint()
#define ID_VIEW_SHOWCOORDINATES
afx_msg void OnTexturesFlushUnused()
void Dmap_f(const idCmdArgs &args)
#define ID_TEXTURES_TEXTUREWINDOWSCALE_100
#define ID_CURVE_HEMISPHERE
#define ID_CURVE_REDISPERSE_ROWS
bool Map_SaveFile(const char *filename, bool use_region, bool autosave)
#define ID_GRID_POINT0625
idCameraPosition * startNewCamera(idCameraPosition::positionType type)
#define ID_SELECTION_TEXTURE_SHIFTUP
void SetWindowStyle(int nStyle)
afx_msg void OnPatchNaturalize()
afx_msg void OnSplinesTargetPoints()
#define ID_VIEW_DOWNFLOOR
void Texture_ShowAll(void)
#define ID_TEXTURES_POPUP
brush_t * gpPrevEntBrushFound
void Map_RegionBrush(void)
afx_msg void OnDynamicLighting()
afx_msg void OnViewCubein()
#define ID_CURVE_SIMPLEPATCHMESH
afx_msg void OnPatchInsdel()
afx_msg void OnBrushFlipz()
afx_msg void OnCameraRight()
afx_msg void OnBrushRotatez()
afx_msg void OnCameraLeft()
afx_msg void OnColorSetqer()
afx_msg void OnCurvePatchbevel()
afx_msg void OnBSPDone(UINT wParam, long lParam)
#define ID_PATCH_DRILLDOWN
afx_msg void OnBrush7sided()
afx_msg void OnCurveCapInvertedendcap()
afx_msg void OnTexturesLoadlist()
void Sys_Status(const char *psz, int part)
#define ID_TEXTURES_TEXTUREWINDOWSCALE_50
#define ID_FILE_NEWPROJECT
#define ID_SELECTION_MAKEHOLLOW
afx_msg void OnSelectionUngroupentity()
const char * ValueForKey(entity_t *ent, const char *key)
#define ID_PROJECTED_LIGHT
afx_msg void OnPatchBend()
afx_msg void OnToggleviewXz()
#define ID_CURVE_INSERT_INSERTCOLUMN
#define ID_PATCH_WIREFRAME
void HandlePopup(CWnd *pWindow, unsigned int uId)
bool GetMatrixForKey(entity_t *ent, const char *key, idMat3 &mat)
bool LoadWindowPlacement(HWND hwnd, const char *pName)
#define ID_SELECTION_SELECTTOUCHING
#define ID_CURVE_MATRIX_TRANSPOSE
afx_msg void OnBrush8sided()
afx_msg void OnCurveInsertAddcolumn()
afx_msg void OnCurveInsertInsertcolumn()
#define ID_SELECTION_VIEW_WIREFRAMEOFF
afx_msg void OnSelectionMakehollow()
void Map_ImportFile(char *fileName)
void GetSurfaceAttributes()
void Brush_Free(brush_t *b, bool bRemoveNode)
#define ID_CURVE_PATCHSQUARE
afx_msg void OnBrush9sided()
#define ID_VIEW_SHOWTRIGGERS
#define ID_SELECTION_TEXTURE_DEC
afx_msg void OnSelectionTogglesizepaint()
bool gbWholeStringMatchOnly
#define ID_SELECT_MOUSESCALE
afx_msg void OnColorSetblack()
afx_msg void OnViewCubeout()
void CheckTextureScale(int id)
afx_msg void OnEditCopybrush()
#define ID_TEXTURES_TEXTUREWINDOWSCALE_25
afx_msg void OnRegionOff()
afx_msg void OnPopupNewcameraSpline()
afx_msg void OnFileLoadproject()
#define ID_CURVE_NEGATIVETEXTUREY
afx_msg void OnCurvePatchdensetube()
afx_msg void OnSelectionTextureShiftup()
afx_msg void OnSelectionWireFrameOn()
bool LoadRegistryInfo(const char *pszName, void *pvBuf, long *plSize)
#define ID_CAMERA_ANGLEDOWN
#define ID_PRECISION_CURSOR_CYCLE
void SetXYFriend(CXYWnd *pWnd)
#define ID_SHOW_LIGHTVOLUMES
#define ID_MISC_FINDBRUSH
BOOL DoMru(HWND hWnd, WORD wId)
void ShowMenuItemKeyBindings(CMenu *pMenu)
int GetNumKeys(entity_t *ent)
#define ID_SELECT_MOUSEROTATE
void Undo_Start(char *operation)
#define ID_SELECT_NOMODELS
#define ID_SOUND_SHOWSELECTEDSOUNDVOLUMES
bool SetRotateMode(bool bMode)
afx_msg void OnCurveCap()
#define ID_CURVE_PATCHINVERTEDBEVEL
afx_msg void OnViewRealtimerebuild()
afx_msg void OnTexturesInspector()
afx_msg void OnSelectionDeselect()
bool g_bShowLightTextures
afx_msg void OnCurveDeleteFirstcolumn()
afx_msg void OnViewRendersound()
void Brush_Build(brush_t *b, bool bSnap, bool bMarkMap, bool bConvert, bool updateLights)
#define ID_SELECT_ALLTARGETS
void SetGridChecks(int nID)
afx_msg void OnTimer(UINT nIDEvent)
void MFCCreate(HINSTANCE hInstance)
afx_msg void OnEditSaveprefab()
afx_msg void OnBrushRotatey()
int Icmp(const char *text) const
#define ID_VIEW_RENDERMODE
#define EDITOR_DEFAULT_PROJECT
#define ID_SELECT_AXIALTEXTURE_ARBITRARY
#define ID_SELECTION_TEXTURE_SCALEUP
afx_msg void OnCurveHemisphere()
afx_msg void OnTexturesTexturewindowscale100()
#define ID_VIEW_REALTIMEREBUILD
#define ID_SELECTION_DRAGVERTECIES
#define EDITOR_REGISTRY_KEY
afx_msg void OnAxialTextureArbitrary()
afx_msg void OnCurveInsertcolumn()
afx_msg void OnViewRenderselection()
#define D3XP_ID_SHOW_MODELS
#define ID_SELECTION_PRINT
afx_msg void OnMiscPrintxy()
afx_msg void OnBrushArbitrarysided()
void SetKeyValue(entity_t *ent, const char *key, const char *value, bool trackAngles)
afx_msg void OnViewShowcoordinates()
#define ID_CAMERA_STRAFELEFT
#define ID_CURVE_DELETE_LASTROW
afx_msg void OnEditLoadprefab()
afx_msg void OnScalelockx()
afx_msg void OnViewShowworld()
#define ID_SELECT_RESELECT
afx_msg void OnSelectionTextureScaleRight()
#define ID_TEXTURES_SHOWINUSE
afx_msg void OnSelectScale()
afx_msg void OnSelectionMoveup()
int Icmpn(const char *text, int n) const
#define ID_SPLIT_SELECTED
afx_msg void OnCurvePatchendcap()
#define ID_SELECTION_TEXTURE_SHIFTRIGHT
afx_msg void OnRegionSetbrush()
#define ID_CURVE_OVERLAY_CLEAR
virtual void BufferCommandText(cmdExecution_t exec, const char *text)=0
afx_msg void OnPatchCombine()
#define ID_CURVE_INCREASE_VERT
afx_msg void OnEditUndo()
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext *pContext)
afx_msg void OnViewShownames()
#define ID_COLORS_VIEWNAME
afx_msg void OnCurveCyclecapAlt()
afx_msg void OnFileSaveas()
void Error(const char *pFormat,...)
void BuildRendererState()
afx_msg void OnSelectionVisibleOff()
afx_msg void OnViewShowCombatNodes()
afx_msg void OnViewEntity()
void Sort(cmp_t *compare=(cmp_t *)&idListSortCompare< type >)
bool ByeByeSurfaceDialog()
afx_msg void OnCurveDeletecolumn()
afx_msg void OnPopupNewcameraInterpolated()
#define ID_POPUP_NEWCAMERA_INTERPOLATED
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
#define ID_SHOW_LIGHTTEXTURES
afx_msg void OnEditEntityinfo()
#define ID_SELECTION_MOVEONLY
afx_msg void OnFileExit()
afx_msg void OnCurveSphere()
#define ID_SELECTION_TEXTURE_SHIFTLEFT
#define ID_SELECTION_DELETE
#define ID_COLOR_SETBLACK
#define ID_SPLINES_ADDPOINTS
#define ID_SPLINES_INSERTPOINTS
#define ID_FILE_PROJECTSETTINGS
afx_msg void OnViewShowNoDraw()
afx_msg void OnViewSide()
int Undo_UndoAvailable(void)
#define ID_MISC_SETVIEWPOS
void save(const char *filename)
#define ID_POPUP_NEWCAMERA_FIXED
afx_msg void OnUpdateFileImport(CCmdUI *pCmdUI)
afx_msg void OnViewRebuildrenderdata()
void Face_SetAxialScale_BrushPrimit(face_t *face, bool y)
afx_msg void OnEditRedo()
afx_msg void OnSizing(UINT fwSide, LPRECT pRect)
#define ID_CURVE_CYCLECAPALT
#define ID_VIEW_SHOWCAULK
afx_msg void OnSplinesInsertPoint()
#define ID_SELECTION_SELECT_NUDGERIGHT
#define ID_COLORS_CLIPPER
afx_msg void OnViewFront()
#define ID_COLOR_SUPERMAL
afx_msg void OnSelectReselect()
afx_msg void OnCameraStrafeleft()
afx_msg void OnCurveCylinder()
virtual void SetPlayingSoundWorld(idSoundWorld *soundWorld)=0
afx_msg void OnSelectAll()
#define ID_COLOR_SETORIGINAL
afx_msg void OnSelectionTextureScaleup()
afx_msg void OnPopupNewcameraFixed()
LPCSTR String_ToLower(LPCSTR psString)
void Pointfile_Clear(void)
afx_msg void OnBrush6sided()
#define ID_TEXTURES_FLUSH
#define ID_CURVE_PATCHCONE
afx_msg void OnBrush4sided()
afx_msg void OnTogglecamera()
afx_msg void OnCurveDeleteFirstrow()
afx_msg void OnSelectionTextureRotateclock()
afx_msg void OnCurvePatchtube()
#define ID_VIEW_SHOWCOMBATNODES
afx_msg void OnFileExportmap()
afx_msg void OnCurvePatchinvertedendcap()
CStatusBar m_wndStatusBar
virtual const char * GetCVarString(const char *name) const =0
afx_msg void OnViewEntitiesasWireframe()
#define ID_SELECTION_CONNECT
#define ID_FILE_IMPORTMAP
#define ID_CURVE_INCREASE_HORZ
#define ID_SELECTION_SELECT_NUDGEUP
#define IDR_POPUP_TEXTURE
#define IDR_TOOLBAR_ADVANCED
#define ID_VIEW_CUBICCLIPPING
#define ID_SELECTION_TEXTURE_ROTATECLOCK
#define ID_PATCH_SHOWBOUNDINGBOX
#define ID_CURVE_DECREASE_VERT
void SetScaleMode(bool bMode)
afx_msg void OnSelectionSelectNudgeright()
void(* UpdateParent)(float r, float g, float b, float a)
afx_msg void OnSelectionCsgmerge()
#define ID_TEXTURES_FLUSH_UNUSED
afx_msg void OnMiscPreviousleakspot()
afx_msg void OnSelectMousescale()
afx_msg void OnBrush3sided()
#define ID_REGION_SETSELECTION
#define ID_FILE_LOADPROJECT
void Cam_MouseControl(float dtime)
void Select_RotateTexture(float amt, bool absolute)
idCurve_NURBS< idVec2 > nurb
afx_msg void OnSnapToGrid()
afx_msg void OnPatchDrilldown()
afx_msg void OnFileImport()
afx_msg void OnColorsMinor()
CPtrArray & g_ptrSelectedFaces
#define ID_MISC_FINDNEXTENT
void ExecuteCommand(const idStr &cmd="")
afx_msg void OnMiscSetViewPos()
afx_msg void OnAxialTextureByHeight()
afx_msg void OnCurveDeleteLastrow()
#define ID_CURVE_INSERT_ADDROW
afx_msg void OnCurveRedisperseCols()
afx_msg void OnColorSetoriginal()
afx_msg void OnToolbarTexture()
afx_msg void OnParentNotify(UINT message, LPARAM lParam)
type * Find(type const &obj) const
#define ID_SELECTION_VIEW_VISIBLEOFF
afx_msg void OnColorsBrush()
#define ID_SELECTION_TEXTURE_FIT
#define ID_DYNAMIC_LIGHTING
#define ID_CURVE_INSERTROW
#define ID_TEXTURES_TEXTUREWINDOWSCALE_10
#define ID_CURVE_NEGATIVETEXTUREX
afx_msg void OnTexturesTexturewindowscale25()
afx_msg void OnGrid1(unsigned int nID)
virtual void Reload(bool force)=0
bool load(const char *filename)
bool SaveRegistryInfo(const char *pszName, void *pvBuf, long lSize)
afx_msg void OnColorsGridblock()
afx_msg void OnSelectionCsgsubtract()
afx_msg void OnActivate(UINT nState, CWnd *pWndOther, BOOL bMinimized)
#define ID_CURVE_PATCHTUBE
#define ID_CURVE_CAP_INVERTEDBEVEL
afx_msg void OnCurveEndcap()
afx_msg void OnGridNext()
#define ID_SELECT_SNAPTOGRID
afx_msg void OnCurveQuarter()
afx_msg void OnCurveIncreaseHorz()
afx_msg void OnBrushRotatex()
void DefaultExtension(char *path, char *extension)
#define ID_MISC_PREVIOUSLEAKSPOT
afx_msg void OnCurveEighthsphere()
afx_msg void OnUpdateTexturesShowinuse(CCmdUI *pCmdUI)
afx_msg void OnToolbarMain()
#define ID_FILE_SAVEREGION
afx_msg void OnSplinesLoad()
#define IDD_DIALOG_INSPECTORS
afx_msg void OnCurveMatrixTranspose()
GLubyte GLubyte GLubyte a
void Select_SetKeyVal(const char *key, const char *val)
void DeleteKey(entity_t *ent, const char *key)
afx_msg void OnTexturesTexturewindowscale50()
void startEdit(bool camera)
#define ID_EDIT_LOADPREFAB
virtual void Printf(const char *fmt,...) id_attribute((format(printf
afx_msg void OnHelpAbout()
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
afx_msg void OnCameraForward()
afx_msg void OnSelectionSelectNudgeleft()
afx_msg void OnUpdateEditUndo(CCmdUI *pCmdUI)
CInspectorDialog * g_Inspectors
#define ID_VIEW_SHOWBLOCKS
#define ID_SELECTION_SELECT_NUDGEDOWN
afx_msg void OnScalelocky()
afx_msg void OnUpdateEditRedo(CCmdUI *pCmdUI)
void Undo_AddEntity(entity_t *entity)
afx_msg void OnSelectNomodels()
afx_msg void OnRegionSetxy()
afx_msg void OnSplinesEditPoints()
afx_msg void OnSplinesSave()
afx_msg void OnPatchNaturalizeAlt()
afx_msg void OnCameraAngledown()
void UpdateWindows(int nBits)
void ToggleAnimationMode()
#define ID_SELECTION_MOVEDOWN
unsigned int m_nModifiers
afx_msg void OnColorsSelectedbrush()
#define ID_BRUSH_MAKECONE
void SetMode(int mode, bool updateTabs=true)
afx_msg void OnMiscFindNextEntity()
afx_msg void OnTexturesTexturewindowscale10()
afx_msg void OnCurveInsertAddrow()
idDeclManager * declManager
void SaveWindowPlacement(HWND hwnd, const char *pName)
afx_msg void OnViewShowcurves()
#define ID_SELECTION_ARBITRARYROTATION
afx_msg void OnViewConsole()
afx_msg void OnBrushFlipy()
afx_msg void OnClipSelected()
afx_msg void OnViewShowShowvisportals()
#define ID_HELP_COMMANDLIST
afx_msg void OnSplinesMode()
#define ID_VIEW_MATERIALANIMATION
afx_msg void OnPatchEnter()
afx_msg void OnBrush5sided()
afx_msg void OnPatchWeld()
#define ID_PATCH_NATURALIZE
afx_msg void OnViewZoomout()
afx_msg void OnRegionSetselection()
void Pointfile_Prev(void)
void Texture_Cleanup(CStringList *pList)
void Texture_SetMode(int iMenu)
#define ID_SELECTION_INVERT
afx_msg void OnGridPrev()
bool Sys_KeyDown(int key)
afx_msg void OnScalelockz()
#define IDR_POPUP_SELECTION
afx_msg void OnViewMaterialanimation()
void Patch_AdjustSubdivisions(float hadj, float vadj)
#define ID_SELECTION_TEXTURE_ROTATECOUNTER
afx_msg void OnViewEntitiesasSkinned()
afx_msg void OnShowLighttextures()
afx_msg void OnViewShowent()
afx_msg void OnCurveOverlayClear()
#define ID_VIEW_SHOWCURVES
int Insert(const type &obj, int index=0)
#define ID_CURVE_PATCHENDCAP
void UpdatePatchToolbarButtons()
#define ID_VIEW_RENDERSELECTION
void Map_RegionSelectedBrushes(void)
afx_msg void OnTexturesTexturewindowscale200()
#define ID_VIEW_SHOW_NODRAW
afx_msg void OnCurvePatchsquare()
LPCSTR GetString(LPCSTR psPrompt)
GLdouble GLdouble GLdouble r
#define ID_PATCH_NATURALIZEALT
afx_msg void OnTexturesShowall()
afx_msg void OnMiscFindOrReplaceEntity()
#define ID_TEXTURES_TEXTUREWINDOWSCALE_200
afx_msg void OnMru(unsigned int nID)
afx_msg void OnPopupSelection()
bool GetVectorForKey(entity_t *ent, const char *key, idVec3 &vec)
void Entity_LinkBrush(entity_t *e, brush_t *b)
afx_msg void OnViewCubicclipping()
afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnTexturesLoad()
CTextureBar m_wndTextureBar
afx_msg void OnViewOpengllighting()
afx_msg void OnBrushMakecone()
#define ID_CURVE_INSERT_INSERTROW
afx_msg void OnSelectionTextureShiftdown()
void FindReplace(CString &strContents, const char *pTag, const char *pValue)
afx_msg void OnViewCameraupdate()
afx_msg void OnAutocaulk()
#define ID_VIEW_HIDESHOW_HIDENOTSELECTED
void Undo_EndBrushList(brush_t *brushlist)
afx_msg void OnTexturesPopup()
#define ID_SPLINES_DELETEPOINTS
void Texture_ShowInuse(void)
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam)
afx_msg void OnColorsGridtext()
void NudgeSelection(int nDirection, float fAmount)
afx_msg void OnShowDoom()
afx_msg void OnCurveMoreendcapsbevelsSquarebevel()
afx_msg void OnFilePointfile()
afx_msg void OnCameraDown()
afx_msg void OnFileSaveregion()
#define ID_SELECTION_VIEW_VISIBLEON
afx_msg void OnColorsClipper()
afx_msg void OnViewRendermode()
afx_msg void OnMiscGamma()
bool SaveWindowState(HWND hWnd, const char *pszName)
void Map_LoadFile(const char *filename)
#define ID_CAMERA_STRAFERIGHT
afx_msg void OnSplinesDeletePoint()
afx_msg void OnSelectionInvert()
afx_msg void OnCurvePatchverydensetube()
#define ID_SELECTION_DESELECT
afx_msg void OnSnaptogrid()
#define ID_TEXTURES_INSPECTOR
afx_msg void OnUpdateFileSaveregion(CCmdUI *pCmdUI)
idSoundSystem * soundSystem
afx_msg void OnShowEntities()
afx_msg void OnPatchWireframe()
virtual BOOL PreTranslateMessage(MSG *pMsg)
afx_msg void OnTexturesFlush()
#define ID_VIEW_BILINEARMIPMAP
afx_msg void OnCurveFreeze()
afx_msg void OnSplinesEdit()
afx_msg void OnPatchTab()
afx_msg void OnCurvePatchinvertedbevel()
afx_msg void OnSelectionDragvertecies()
afx_msg void OnSplineTest()
#define ID_CURVE_MOREENDCAPSBEVELS_SQUAREBEVEL
afx_msg void OnFileSaveCopy()
afx_msg void OnViewCenter()
void SaveWindowPlacement(int ID=-1)
#define ID_SELECTION_SELECTCOMPLETETALL
bool getCameraInfo(long time, idVec3 &origin, idVec3 &direction, float *fv)
#define ID_FILE_EXPORTMAP
afx_msg void OnSelectionTextureShiftright()
#define ID_SELECT_BRUSHESONLY
afx_msg void OnSplinesCameraPoints()
#define ID_EDIT_ENTITYINFO
afx_msg void OnCurveMoreendcapsbevelsSquareendcap()
afx_msg void OnSelectionDelete()
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnFileImportmap()
#define ID_CURVE_PATCHBEVEL
idCVar radiant_entityMode("radiant_entityMode","0", CVAR_TOOL|CVAR_ARCHIVE,"")
afx_msg void OnCurveDecreaseVert()
#define ID_SELECTION_SELECT_NUDGELEFT
#define ID_SELECTION_TEXTURE_SHIFTDOWN
const char * c_str(void) const
void Patch_Weld(patchMesh_t *p, patchMesh_t *p2)
afx_msg void OnSelectionMoveonly()
const char * GetKeyString(entity_t *ent, int iIndex)
#define ID_VIEW_MEDIABROWSER
#define ID_SELECT_AXIALTEXTURE_BYWIDTH
#define ID_CURVE_REDISPERSE_COLS
#define ID_CURVE_PATCHINVERTEDENDCAP
#define ID_SELECTION_TEXTURE_SCALERIGHT
void SetButtonMenuStates()
afx_msg void OnDisplayChange(WPARAM wp, LPARAM lp)
#define ID_VIEW_CROSSHAIR
#define ID_CURVE_OVERLAY_SET
void StripExtension(char *path)
afx_msg void OnRegionSettallbrush()
afx_msg void OnBspCommand(unsigned int nID)
afx_msg void OnViewZ100()
#define ID_SELECTION_TEXTURE_SCALELEFT
idCameraDef * g_splineList
afx_msg void OnFileSave()
#define ID_EDIT_SAVEPREFAB
void Map_RegionTallBrush(void)
afx_msg void OnCurveNegative()
afx_msg void OnSelectionConnect()
afx_msg void OnSelectionSelectcompletetall()
afx_msg void OnCurveCyclecap()
afx_msg void OnCurveOverlaySet()
afx_msg void OnCurveCapInvertedbevel()
#define ID_CURVE_DECREASE_HORZ
afx_msg void OnFileProjectsettings()
afx_msg void OnNurbEditor()
afx_msg void OnViewShowlights()
void OnPrecisionCursorCycle()
#define ID_CURVE_UNFREEZEALL
afx_msg void OnSelectionDragedges()
afx_msg void OnBSPStatus(UINT wParam, long lParam)
afx_msg void OnTextureReplaceall()
bool gbSelectAllMatchingEnts
#define ID_TEXTURES_RELOADSHADERS
#define ID_SELECTION_SELECTINSIDE
#define ID_CURVE_NEGATIVE
afx_msg void OnTextureWad(unsigned int nID)
afx_msg void OnColorsMajor()
afx_msg void OnSelectionSelectNudgeup()
#define ID_MISC_NEXTLEAKSPOT
afx_msg void OnViewShowwater()
afx_msg void OnProjectedLight()
afx_msg void OnEditPastebrush()
#define EDITOR_WINDOWTEXT
afx_msg void OnUpdateAutocaulk(CCmdUI *pCmdUI)
afx_msg void OnFlipClip()
bool CamOK(unsigned int nKey)
#define ID_SELECTION_SELECTPARTIALTALL
afx_msg void OnViewHideshowHideNotselected()
afx_msg void OnViewRenderentityoutlines()
afx_msg void OnSelectionTextureRotatecounter()
#define ID_TOOLBAR_TEXTURE
afx_msg void OnCameraStraferight()
#define VectorMA(v, s, b, o)
#define ID_REGION_SETTALLBRUSH
#define ID_COLORS_GRIDBLOCK
virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
afx_msg void OnSelectAlltargets()
afx_msg void OnFilePrintPreview()
#define ID_CURVE_EIGHTHSPHERE
#define ID_EDIT_PASTEBRUSH
afx_msg void OnViewHideshowHideselected()
virtual BOOL PreCreateWindow(CREATESTRUCT &cs)
afx_msg void OnViewShowclip()
#define ID_VIEW_SHOWLIGHTS
afx_msg void OnAxialTextureByWidth()
BOOL m_selectByBoundingBrush
#define ID_CURVE_INSERTCOLUMN
afx_msg void OnSelectMouserotate()
afx_msg void OnToggleTextureBar()
void Cam_ChangeFloor(bool up)
char * va(const char *fmt,...)
afx_msg void OnSplinesAddPoints()
#define ID_CURVE_UNFREEZE
int GetNumValues(void) const
afx_msg void OnSelectionTextureInc()
afx_msg void OnViewChange()
afx_msg void OnViewCrosshair()
bool FindNextBrush(brush_t *pPrevFoundBrush)
afx_msg void OnSplitSelected()
#define ID_CAMERA_ANGLEUP
#define ID_SELECTION_CSGSUBTRACT
#define ID_SELECTION_TEXTURE_SCALEDOWN
afx_msg void OnViewNextview()
afx_msg void OnTexturebk()
afx_msg void OnCurveRedisperseRows()
afx_msg void OnColorsViewname()
CRect g_rctOld(0, 0, 0, 0)
afx_msg void OnTexturesShadersShow()
void SetKeyVec3(entity_t *ent, const char *key, idVec3 v)
afx_msg void OnSelectionMovedown()
afx_msg void OnViewTexture()
#define ID_CURVE_PATCHVERYDENSETUBE
#define ID_PATCH_NURBEDITOR
afx_msg void OnViewShowTriggers()
void Map_SaveSelected(char *fileName)
#define ID_CURVE_DELETE_LASTCOLUMN
afx_msg void OnCurvePatchcone()
float FloatForKey(entity_t *ent, const char *key)
afx_msg void OnEditMapinfo()
#define ID_SELECT_AXIALTEXTURE_BYHEIGHT
#define ID_TEXTURES_LOADLIST
#define ID_SELECTION_MOVEUP
afx_msg void OnSelectionVisibleOn()
afx_msg void OnSelectionClone()
afx_msg void OnViewShowcaulk()
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
void ErrorBox(const char *sString)
afx_msg void OnSelectionTextureDec()
#define ID_VIEW_SHOWNAMES
#define ID_REGION_SETBRUSH
#define ID_SELECT_COMPLETE_ENTITY
afx_msg void OnSelectionSelectinside()
int sprintf(idStr &string, const char *fmt,...)
afx_msg void OnPatchToggleBox()
#define ID_VIEW_SHOWWORLD
#define ID_SELECTION_UNGROUPENTITY
afx_msg void OnCurveUnFreeze()
#define ID_POPUP_SELECTION
afx_msg void OnViewShowModels()
afx_msg void OnSelectionCombine()
afx_msg void OnSelectionTextureScaledown()
#define ID_BRUSH_PRIMITIVES_SPHERE
afx_msg void OnCurveIncreaseVert()
virtual void ActivateTool(bool active)=0
afx_msg void OnShowLightvolumes()
#define ID_CURVE_DELETEROW
afx_msg void OnSelectionSelecttouching()
#define ID_VIEW_CAMERATOGGLE
const int CMD_BSPCOMMAND_END
afx_msg void OnSoundShowsoundvolumes()
afx_msg void OnCurveInvertcurve()
#define ID_CURVE_DELETE_FIRSTROW
void LightEditorInit(const idDict *spawnArgs)
#define ID_MISC_FINDORREPLACEENTITY
void SetConsoleText(const idStr &text)
#define ID_VIEW_REBUILDRENDERDATA
afx_msg void OnGenerateMaterialsList()
afx_msg void OnToggleRotatelock()
void SetClipMode(bool bMode)
const int CMD_TEXTUREWAD_END
afx_msg void OnViewZzoomout()
afx_msg void OnCurveUnFreezeAll()
#define ID_VIEW_OPENGLLIGHTING
afx_msg void OnSelectionArbitraryrotation()
afx_msg void OnSelectionCenterOrigin()
#define ID_VIEW_ENTITIESAS_WIREFRAME
afx_msg void OnBrushFlipx()
afx_msg void OnViewZzoomin()
afx_msg void OnViewMediaBrowser()
afx_msg void OnCurveDeleterow()
afx_msg void OnCurveThicken()