diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_surface.cpp b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_surface.cpp index d8d3e8ea6..e5f2220ba 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_surface.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_surface.cpp @@ -33,13 +33,13 @@ INT_PTR CALLBACK SelectByMatDlgProc( case WM_COMMAND: switch (LOWORD(wParam)) { - case IDOK: + case IDOK: { ISpinnerControl *spin = GetISpinner(GetDlgItem(hWnd, IDC_MAT_IDSPIN)); param[0] = spin->GetIVal(); param[1] = IsDlgButtonChecked(hWnd, IDC_CLEARSELECTION); ReleaseISpinner(spin); - EndDialog(hWnd, 1); + EndDialog(hWnd, 1); break; } @@ -57,7 +57,7 @@ INT_PTR CALLBACK SelectByMatDlgProc( // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0) +void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0) { for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++) { @@ -71,7 +71,7 @@ void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0 { SetWindowText(GetDlgItem(hWnd, i), NULL); SendMessage(GetDlgItem(hWnd, i), CC_COMMAND, CC_CMD_SET_STATE, FALSE); - } else + } else { TSTR buf; buf.printf(_T("%d"), i - IDC_SMOOTH_GRP1 + 1); @@ -84,7 +84,7 @@ void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0 // ------------------------------------------------------------------------------------------------------------------------------------------------------ -INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { static DWORD *param; switch (msg) @@ -99,19 +99,19 @@ INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA CenterWindow(hWnd, GetParent(hWnd)); break; - case WM_COMMAND: + case WM_COMMAND: if (LOWORD(wParam) >= IDC_SMOOTH_GRP1 && LOWORD(wParam) <= IDC_SMOOTH_GRP32) { - ICustButton *iBut = GetICustButton(GetDlgItem(hWnd, LOWORD(wParam))); - int shift = LOWORD(wParam) - IDC_SMOOTH_GRP1; + ICustButton *iBut = GetICustButton(GetDlgItem(hWnd, LOWORD(wParam))); + int shift = LOWORD(wParam) - IDC_SMOOTH_GRP1; if (iBut->IsChecked()) { param[0] |= 1 << shift; - } else + } else { param[0] &= ~(1 << shift); - } + } ReleaseICustButton(iBut); break; } @@ -119,15 +119,15 @@ INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA switch (LOWORD(wParam)) { case IDOK: - param[1] = IsDlgButtonChecked(hWnd, IDC_CLEARSELECTION); - EndDialog(hWnd, 1); - break; + param[1] = IsDlgButtonChecked(hWnd, IDC_CLEARSELECTION); + EndDialog(hWnd, 1); + break; case IDCANCEL: EndDialog(hWnd, 0); break; } - break; + break; default: return FALSE; @@ -142,10 +142,10 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA); if (!ep && message != WM_INITDIALOG) return FALSE; - + switch (message) { - case WM_INITDIALOG: + case WM_INITDIALOG: { ep =(EditPatchMod *)lParam; @@ -169,16 +169,16 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM ep->tileRot = NULL; } return FALSE; - + case CC_SPINNER_CHANGE: /*switch (LOWORD(wParam)) { - case IDC_TILE_MAT_SPIN: + case IDC_TILE_MAT_SPIN: if (HIWORD(wParam)) break; // No interactive action ep->SetTileNum (ep->tileNum->GetIVal()); break; - case IDC_TILE_ROT_SPIN: + case IDC_TILE_ROT_SPIN: if (HIWORD(wParam)) break; // No interactive action ep->SetTileRot (ep->tileRot->GetIVal()); @@ -208,8 +208,8 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (u == 0xffffffff) { ep->tileNum->SetIndeterminate(TRUE); - } - else + } + else { ep->tileNum->SetIndeterminate(FALSE); ep->tileNum->SetValue((int)u, FALSE); @@ -220,13 +220,13 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (v == -1) { ep->tileRot->SetIndeterminate(TRUE); - } - else + } + else { ep->tileRot->SetIndeterminate(FALSE); ep->tileRot->SetValue(v, FALSE); }*/ - + ep->patchUIValid = TRUE; } return FALSE; @@ -237,7 +237,7 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM }*/ break; } - + return FALSE; } @@ -248,10 +248,10 @@ INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA); if (!ep && message != WM_INITDIALOG) return FALSE; - + switch (message) { - case WM_INITDIALOG: + case WM_INITDIALOG: { ep =(EditPatchMod *)lParam; @@ -263,7 +263,7 @@ INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM case WM_DESTROY: return FALSE; - + case WM_PAINT: if (!ep->edgeUIValid) { @@ -294,7 +294,7 @@ INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM case WM_COMMAND: switch (LOWORD(wParam)) - { + { case IDC_NO_SMOOTH: // 3 states management if (IsDlgButtonChecked(hDlg, IDC_NO_SMOOTH)==BST_INDETERMINATE) @@ -306,7 +306,7 @@ INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM } break; } - + return FALSE; } @@ -317,21 +317,21 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA); if (!ep && message != WM_INITDIALOG) return FALSE; - + switch (message) { - case WM_INITDIALOG: + case WM_INITDIALOG: { ep = (EditPatchMod *)lParam; ep->hSurfPanel = hDlg; for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++) SendMessage(GetDlgItem(hDlg, i), CC_COMMAND, CC_CMD_SET_TYPE, CBT_CHECK); - SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); + SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); ep->matSpin = SetupIntSpinner(hDlg, IDC_MAT_IDSPIN, IDC_MAT_ID, 1, MAX_MATID, 0); ep->tessUSpin = SetupIntSpinner(hDlg, IDC_TESS_U_SPIN, IDC_TESS_U2, 1, 4, RPO_DEFAULT_TESSEL); ep->tessVSpin = SetupIntSpinner(hDlg, IDC_TESS_V_SPIN, IDC_TESS_V2, 1, 4, RPO_DEFAULT_TESSEL); - + ep->SetSurfDlgEnables(); return TRUE; @@ -354,17 +354,17 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM ep->tessVSpin = NULL; } return FALSE; - + case CC_SPINNER_CHANGE: switch (LOWORD(wParam)) { - case IDC_MAT_IDSPIN: + case IDC_MAT_IDSPIN: if (HIWORD(wParam)) break; // No interactive action ep->SetSelMatIndex(ep->matSpin->GetIVal() - 1); break; - case IDC_TESS_U_SPIN: - case IDC_TESS_V_SPIN: + case IDC_TESS_U_SPIN: + case IDC_TESS_V_SPIN: if (HIWORD(wParam)) break; // No interactive action ep->SetSelTess(ep->tessUSpin->GetIVal(), ep->tessVSpin->GetIVal()); @@ -379,8 +379,8 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM ep->SetSelMatIndex(ep->matSpin->GetIVal() - 1); ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END); break; - case IDC_TESS_U_SPIN: - case IDC_TESS_V_SPIN: + case IDC_TESS_U_SPIN: + case IDC_TESS_V_SPIN: ep->SetSelTess(ep->tessUSpin->GetIVal(), ep->tessVSpin->GetIVal()); ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END); break; @@ -395,8 +395,8 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (mat == -1) { ep->matSpin->SetIndeterminate(TRUE); - } - else + } + else { ep->matSpin->SetIndeterminate(FALSE); ep->matSpin->SetValue(mat + 1, FALSE); @@ -411,8 +411,8 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (u == -1) { ep->tessUSpin->SetIndeterminate(TRUE); - } - else + } + else { ep->tessUSpin->SetIndeterminate(FALSE); ep->tessUSpin->SetValue(u, FALSE); @@ -423,8 +423,8 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (v == -1) { ep->tessVSpin->SetIndeterminate(TRUE); - } - else + } + else { ep->tessVSpin->SetIndeterminate(FALSE); ep->tessVSpin->SetValue(v, FALSE); @@ -446,25 +446,25 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM break; } switch (LOWORD(wParam)) - { + { // Material - case IDC_SELECT_BYID: - { + case IDC_SELECT_BYID: + { if (DialogBoxParam( - hInstance, + hInstance, MAKEINTRESOURCE(IDD_SELECTBYMAT), - ep->ip->GetMAXHWnd(), + ep->ip->GetMAXHWnd(), SelectByMatDlgProc, (LPARAM)sbmParams)) { - + ep->SelectByMat(sbmParams[0] - 1/*index*/, sbmParams[1]/*clear*/); } break; } // Smoothing groups - case IDC_SELECTBYSMOOTH: - { + case IDC_SELECTBYSMOOTH: + { sbsParams[2] = ~ep->GetUsedSmoothBits(); if (DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_EM_SELECTBYSMOOTH), ep->ip->GetMAXHWnd(), SelectBySmoothDlgProc, (LPARAM)sbsParams)) @@ -486,19 +486,19 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM } break; } - + return FALSE; } // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetSurfDlgEnables() +void EditPatchMod::SetSurfDlgEnables() { if (!hSurfPanel) return; - + nlassert(ip); - + BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE; BOOL pType =(GetSubobjectLevel() == EP_PATCH) ? TRUE : FALSE; @@ -532,13 +532,13 @@ void EditPatchMod::SetSurfDlgEnables() // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetTileDlgEnables() +void EditPatchMod::SetTileDlgEnables() { if (!hTilePanel) return; - + nlassert(ip); - + BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE; BOOL pType =(GetSubobjectLevel() == EP_TILE) ? TRUE : FALSE; @@ -550,13 +550,13 @@ void EditPatchMod::SetTileDlgEnables() // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetEdgeDlgEnables() +void EditPatchMod::SetEdgeDlgEnables() { if (!hEdgePanel) return; - + nlassert(ip); - + BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE; BOOL pType =(GetSubobjectLevel() == EP_TILE) ? TRUE : FALSE; @@ -573,14 +573,14 @@ DWORD EditPatchMod::GetSelSmoothBits(DWORD &invalid) BOOL first = 1; DWORD bits = 0; invalid = 0; - ModContextList mcList; + ModContextList mcList; INodeTab nodes; if (!ip) return 0; ip->GetModContexts(mcList, nodes); ClearPatchDataFlag(mcList, EPD_BEENDONE); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; @@ -601,8 +601,8 @@ DWORD EditPatchMod::GetSelSmoothBits(DWORD &invalid) if (first) { first = FALSE; - bits = patch->patches[j].smGroup; - } else + bits = patch->patches[j].smGroup; + } else { if (patch->patches[j].smGroup != bits) { @@ -614,7 +614,7 @@ DWORD EditPatchMod::GetSelSmoothBits(DWORD &invalid) patchData->SetFlag(EPD_BEENDONE, TRUE); } - + nodes.DisposeTemporary(); return bits; } @@ -622,16 +622,16 @@ DWORD EditPatchMod::GetSelSmoothBits(DWORD &invalid) // ------------------------------------------------------------------------------------------------------------------------------------------------------ DWORD EditPatchMod::GetUsedSmoothBits() - { + { DWORD bits = 0; - ModContextList mcList; + ModContextList mcList; INodeTab nodes; if (!ip) return 0; ip->GetModContexts(mcList, nodes); ClearPatchDataFlag(mcList, EPD_BEENDONE); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; @@ -648,11 +648,11 @@ DWORD EditPatchMod::GetUsedSmoothBits() for (int j = 0; j < patch->getNumPatches(); j++) { bits |= patch->patches[j].smGroup; - } + } patchData->SetFlag(EPD_BEENDONE, TRUE); } - + nodes.DisposeTemporary(); return bits; } @@ -661,14 +661,14 @@ DWORD EditPatchMod::GetUsedSmoothBits() void EditPatchMod::SelectBySmoothGroup(DWORD bits, BOOL clear) { - ModContextList mcList; + ModContextList mcList; INodeTab nodes; if (!ip) return; ip->GetModContexts(mcList, nodes); ClearPatchDataFlag(mcList, EPD_BEENDONE); - + theHold.Begin(); for (int i = 0; i < mcList.Count(); i++) @@ -689,25 +689,25 @@ void EditPatchMod::SelectBySmoothGroup(DWORD bits, BOOL clear) { theHold.Put(new PatchSelRestore(patchData, this, patch)); } - + if (clear) - patch->patchSel.ClearAll(); + patch->patchSel.ClearAll(); for (int j = 0; j < patch->getNumPatches(); j++) - { + { if (patch->patches[j].smGroup & bits) { - patch->patchSel.Set(j); + patch->patchSel.Set(j); } } - + patchData->UpdateChanges(patch, rpatch, FALSE); patchData->SetFlag(EPD_BEENDONE, TRUE); patchData->TempData(this)->Invalidate(PART_SELECT); } - + PatchSelChanged(); theHold.Accept(GetString(IDS_RB_SELECTBYSMOOTH)); - + nodes.DisposeTemporary(); NotifyDependents(FOREVER, PART_SELECT, REFMSG_CHANGE); ip->RedrawViews(ip->GetTime()); @@ -717,14 +717,14 @@ void EditPatchMod::SelectBySmoothGroup(DWORD bits, BOOL clear) void EditPatchMod::SetSelSmoothBits(DWORD bits, DWORD which) { - ModContextList mcList; + ModContextList mcList; INodeTab nodes; if (!ip) return; ip->GetModContexts(mcList, nodes); ClearPatchDataFlag(mcList, EPD_BEENDONE); - + theHold.Begin(); for (int i = 0; i < mcList.Count(); i++) @@ -745,24 +745,24 @@ void EditPatchMod::SetSelSmoothBits(DWORD bits, DWORD which) { theHold.Put(new PatchSelRestore(patchData, this, patch)); } - + for (int j = 0; j < patch->getNumPatches(); j++) - { + { if (patch->patchSel[j]) { patch->patches[j].smGroup &= ~which; - patch->patches[j].smGroup |= bits&which; + patch->patches[j].smGroup |= bits&which; } } - + patchData->UpdateChanges(patch, rpatch, FALSE); patchData->SetFlag(EPD_BEENDONE, TRUE); patchData->TempData(this)->Invalidate(PART_SELECT); } - + PatchSelChanged(); theHold.Accept(GetString(IDS_RB_SETSMOOTHGROUP)); - + nodes.DisposeTemporary(); NotifyDependents(FOREVER, PART_TOPO, REFMSG_CHANGE); InvalidateSurfaceUI(); diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_tess.cpp b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_tess.cpp index b2fde4eb7..de534123d 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_tess.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_epm_tess.cpp @@ -14,7 +14,7 @@ #define PROMPT_TIME 2000 extern AdvParams sParams; -INT_PTR CALLBACK AdvParametersDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK AdvParametersDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); // ------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -56,7 +56,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess) { CheckDlgButton(hDlg, IDC_TILE_MODE, TRUE); } - else + else { CheckDlgButton(hDlg, IDC_TILE_MODE, FALSE); } @@ -66,7 +66,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess) EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck); EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck); EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck); - + // New EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck); EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck); @@ -76,7 +76,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess) if (keepMapping) CheckDlgButton(hDlg, IDC_KEEP_MAPPING, TRUE); - else + else CheckDlgButton(hDlg, IDC_KEEP_MAPPING, FALSE); switch (tess->type) @@ -166,13 +166,13 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess) EnableWindow(GetDlgItem(hDlg, IDC_TESS_NORMALS), !GetViewTessWeld()); EnableWindow(GetDlgItem(hDlg, IDC_WELDTESS), tess->merge > 0.0f); } - } else + } else { if (settingDisp) { ShowWindow(GetDlgItem(hDlg, IDC_MESH), SW_SHOW); ShowWindow(GetDlgItem(hDlg, IDC_DISP), SW_SHOW); - } else + } else { if (tess->type != TESS_SET) { @@ -202,7 +202,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess) CheckDlgButton(hDlg, IDC_TESS_RENDERER, FALSE); CheckDlgButton(hDlg, IDC_TESS_NORMALS, GetViewTessNormals()); CheckDlgButton(hDlg, IDC_WELDTESS, GetViewTessWeld()); - } else + } else { CheckDlgButton(hDlg, IDC_TESS_VIEW, FALSE); CheckDlgButton(hDlg, IDC_TESS_RENDERER, TRUE); @@ -213,28 +213,28 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess) } // ------------------------------------------------------------------------------------------------------------------------------------------------------ - + BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA); if (!ep && message != WM_INITDIALOG) return FALSE; - + switch (message) { - case WM_INITDIALOG: + case WM_INITDIALOG: { ep =(EditPatchMod *)lParam; ep->hSurfPanel = hDlg; - SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); + SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); if (!ep->settingViewportTess && ep->settingDisp && ep->GetProdTess().type == TESS_SET) ep->settingDisp = FALSE; TessApprox t; if (ep->settingViewportTess) { t = ep->GetViewTess(); - } else + } else { if (ep->settingDisp) t = ep->GetDispTess(); @@ -286,14 +286,14 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM ep->mergeSpin = NULL; } return FALSE; - - case CC_SPINNER_BUTTONUP: + + case CC_SPINNER_BUTTONUP: { TessApprox tess; if (ep->settingViewportTess) { tess = ep->GetViewTess(); - } else + } else { if (ep->settingDisp) tess = ep->GetDispTess(); @@ -304,7 +304,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM } break; - case CC_SPINNER_CHANGE: + case CC_SPINNER_CHANGE: switch (LOWORD(wParam)) { case IDC_TESS_U_SPINNER: @@ -318,7 +318,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (ep->settingViewportTess) { tess = ep->GetViewTess(); - } else + } else { if (ep->settingDisp) tess = ep->GetDispTess(); @@ -349,7 +349,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (ep->settingViewportTess) { ep->SetViewTess(tess); - } else + } else { if (ep->settingDisp) ep->SetDispTess(tess); @@ -365,9 +365,9 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM case WM_COMMAND: switch (LOWORD(wParam)) - { + { // Tessellation - case IDC_TESS_VIEW: + case IDC_TESS_VIEW: { ep->settingViewportTess = TRUE; TessApprox t = ep->GetViewTess(); @@ -375,14 +375,14 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM EnableWindow(GetDlgItem(hDlg, IDC_TESS_VIEW_DEP), FALSE); // always off here break; } - case IDC_TESS_RENDERER: + case IDC_TESS_RENDERER: { ep->settingViewportTess = FALSE; if (ep->settingDisp) { TessApprox t = ep->GetDispTess(); ep->SetTessUI(hDlg, &t); - } else + } else { TessApprox t = ep->GetProdTess(); ep->SetTessUI(hDlg, &t); @@ -401,13 +401,13 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM { BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_TILE_MODE)==BST_CHECKED); ep->SetTileMode (bCheck!=0); - + // Old EnableWindow (GetDlgItem (hDlg, IDC_STEPS), !bCheck); EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck); EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck); EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck); - + // New EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck); EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck); @@ -435,7 +435,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (ep->settingViewportTess) { tess = ep->GetViewTess(); - } else + } else { if (ep->settingDisp) tess = ep->GetDispTess(); @@ -476,7 +476,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (ep->settingViewportTess) { ep->SetViewTess(tess); - } else + } else { if (ep->settingDisp) ep->SetDispTess(tess); @@ -486,7 +486,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM ep->SetTessUI(hDlg, &tess); } break; - case IDC_TESS_VIEW_DEP: + case IDC_TESS_VIEW_DEP: { TessApprox tess; tess = ep->GetProdTess(); @@ -502,7 +502,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM { ep->SetViewTessNormals(IsDlgButtonChecked(hDlg, IDC_TESS_NORMALS)); ep->SetTessUI(hDlg, &ep->GetViewTess()); - } else + } else { ep->SetProdTessNormals(IsDlgButtonChecked(hDlg, IDC_TESS_NORMALS)); if (ep->settingDisp) @@ -516,7 +516,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM { ep->SetViewTessWeld(IsDlgButtonChecked(hDlg, IDC_WELDTESS)); ep->SetTessUI(hDlg, &ep->GetViewTess()); - } else + } else { ep->SetProdTessWeld(IsDlgButtonChecked(hDlg, IDC_WELDTESS)); if (ep->settingDisp) @@ -525,13 +525,13 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM ep->SetTessUI(hDlg, &ep->GetProdTess()); } break; - case IDC_ADVANCED_PARAMETERS: + case IDC_ADVANCED_PARAMETERS: { TessApprox tess; if (ep->settingViewportTess) { tess = ep->GetViewTess(); - } else + } else { if (ep->settingDisp) tess = ep->GetDispTess(); @@ -557,7 +557,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (MessageBox(hDlg, warning, title, MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2) == IDYES) confirm = TRUE; - + } else confirm = TRUE; if (confirm) @@ -570,7 +570,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (ep->settingViewportTess) { ep->SetViewTess(tess); - } else + } else { if (ep->settingDisp) ep->SetDispTess(tess); @@ -584,8 +584,8 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM } break; } - - return FALSE; + + return FALSE; } // ------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -602,7 +602,7 @@ AdvParametersDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { - case WM_INITDIALOG: + case WM_INITDIALOG: { initing = TRUE; CenterWindow(hDlg, GetCOREInterface()->GetMAXHWnd()); @@ -628,7 +628,7 @@ AdvParametersDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) CheckDlgButton(hDlg, IDC_DELAUNAY, TRUE); break; } - break; + break; } case WM_COMMAND: @@ -706,27 +706,27 @@ AdvParametersDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetViewTess(TessApprox &tess) +void EditPatchMod::SetViewTess(TessApprox &tess) { viewTess = tess; ModContextList mcList; INodeTab nodes; - + if (!ip) - return; - + return; + ip->GetModContexts(mcList, nodes); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; if (!patchData) - continue; + continue; RPatchMesh *rpatch; PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch); if (!patch) continue; - + patch->SetViewTess(tess); patchData->viewTess = tess; //rpatch->rTess = rTess; @@ -742,27 +742,27 @@ void EditPatchMod::SetViewTess(TessApprox &tess) // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetProdTess(TessApprox &tess) +void EditPatchMod::SetProdTess(TessApprox &tess) { prodTess = tess; ModContextList mcList; INodeTab nodes; - + if (!ip) - return; - + return; + ip->GetModContexts(mcList, nodes); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; if (!patchData) - continue; + continue; RPatchMesh *rpatch; PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch); if (!patch) continue; - + patch->SetProdTess(tess); patchData->prodTess = tess; if (patchData->tempData) @@ -777,27 +777,27 @@ void EditPatchMod::SetProdTess(TessApprox &tess) // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetDispTess(TessApprox &tess) +void EditPatchMod::SetDispTess(TessApprox &tess) { dispTess = tess; ModContextList mcList; INodeTab nodes; - + if (!ip) - return; - + return; + ip->GetModContexts(mcList, nodes); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; if (!patchData) - continue; + continue; RPatchMesh *rpatch; PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch); if (!patch) continue; - + patch->SetDispTess(tess); patchData->dispTess = tess; if (patchData->tempData) @@ -812,27 +812,27 @@ void EditPatchMod::SetDispTess(TessApprox &tess) // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetViewTessNormals(BOOL use) +void EditPatchMod::SetViewTessNormals(BOOL use) { mViewTessNormals = use; ModContextList mcList; INodeTab nodes; - + if (!ip) - return; - + return; + ip->GetModContexts(mcList, nodes); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; if (!patchData) - continue; + continue; RPatchMesh *rpatch; PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch); if (!patch) continue; - + patch->SetViewTessNormals(use); patchData->mViewTessNormals = use; if (patchData->tempData) @@ -847,27 +847,27 @@ void EditPatchMod::SetViewTessNormals(BOOL use) // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetProdTessNormals(BOOL use) +void EditPatchMod::SetProdTessNormals(BOOL use) { mProdTessNormals = use; ModContextList mcList; INodeTab nodes; - + if (!ip) - return; - + return; + ip->GetModContexts(mcList, nodes); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; if (!patchData) - continue; + continue; RPatchMesh *rpatch; PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch); if (!patch) continue; - + patch->SetProdTessNormals(use); patchData->mProdTessNormals = use; if (patchData->tempData) @@ -882,27 +882,27 @@ void EditPatchMod::SetProdTessNormals(BOOL use) // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetViewTessWeld(BOOL weld) +void EditPatchMod::SetViewTessWeld(BOOL weld) { mViewTessWeld = weld; ModContextList mcList; INodeTab nodes; - + if (!ip) - return; - + return; + ip->GetModContexts(mcList, nodes); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; if (!patchData) - continue; + continue; RPatchMesh *rpatch; PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch); if (!patch) continue; - + patch->SetViewTessWeld(weld); patchData->mViewTessWeld = weld; if (patchData->tempData) @@ -917,27 +917,27 @@ void EditPatchMod::SetViewTessWeld(BOOL weld) // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetProdTessWeld(BOOL weld) +void EditPatchMod::SetProdTessWeld(BOOL weld) { mProdTessWeld = weld; ModContextList mcList; INodeTab nodes; - + if (!ip) - return; - + return; + ip->GetModContexts(mcList, nodes); - + for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; if (!patchData) - continue; + continue; RPatchMesh *rpatch; PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch); if (!patch) continue; - + patch->SetProdTessWeld(weld); patchData->mProdTessWeld = weld; if (patchData->tempData) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp index ff87bf78d..ec109d320 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_mods.cpp @@ -26,7 +26,7 @@ int controlsInit = FALSE; using namespace NLMISC; /** public functions **/ -BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { // initialize nel context if (!NLMISC::INelContext::isContextInitialised()) @@ -40,11 +40,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { hInstance = hinstDLL; DisableThreadLibraryCalls(hInstance); - - if (!controlsInit) + + if (!controlsInit) { controlsInit = TRUE; - + // jaguar controls #if MAX_VERSION_MAJOR < 14 InitCustomControls(hInstance); @@ -55,12 +55,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) Ctl3dRegister(hinstDLL); Ctl3dAutoSubclass(hinstDLL); #endif - + // initialize Chicago controls InitCommonControls(); } } - + return TRUE; } @@ -68,20 +68,20 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) //------------------------------------------------------ // This is the interface to Jaguar: //------------------------------------------------------ -__declspec( dllexport ) const TCHAR *LibDescription() -{ +__declspec( dllexport ) const TCHAR *LibDescription() +{ return _T("NeL Patch Edit"); } /// MUST CHANGE THIS NUMBER WHEN ADD NEW CLASS __declspec( dllexport ) int LibNumberClasses() -{ +{ return 1; } -__declspec( dllexport ) ClassDesc *LibClassDesc(int i) +__declspec( dllexport ) ClassDesc *LibClassDesc(int i) { - switch(i) + switch(i) { case 0: return GetEditPatchModDesc(); default: return NULL; @@ -90,7 +90,7 @@ __declspec( dllexport ) ClassDesc *LibClassDesc(int i) // Return version so can detect obsolete DLLs __declspec( dllexport ) ULONG LibVersion() -{ +{ return VERSION_3DSMAX; } diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_rollup.cpp b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_rollup.cpp index 7d72aca97..baf340ae2 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/np_rollup.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/np_rollup.cpp @@ -22,7 +22,7 @@ BOOL filterVerts = TRUE; static BOOL filterVecs = TRUE; -static void SetVertFilter() +static void SetVertFilter() { patchHitLevel[EP_VERTEX] =(filterVerts ? SUBHIT_PATCH_VERTS : 0) |(filterVecs ? SUBHIT_PATCH_VECS : 0); } @@ -40,10 +40,10 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR ICustToolbar *iToolbar; if (!ep && message != WM_INITDIALOG) return FALSE; - + switch (message) { - case WM_INITDIALOG: + case WM_INITDIALOG: { // Get the module path HMODULE hModule = hInstance; @@ -75,9 +75,9 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR // Setup version number TCHAR version[512]; _stprintf(version, _T("Version %d.%d.%d.%d"), - info->dwFileVersionMS>>16, - info->dwFileVersionMS&0xffff, - info->dwFileVersionLS>>16, + info->dwFileVersionMS>>16, + info->dwFileVersionMS&0xffff, + info->dwFileVersionLS>>16, info->dwFileVersionLS&0xffff); SetWindowText (GetDlgItem (hDlg, IDC_VERSION), version); } @@ -104,7 +104,7 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR ep =(EditPatchMod *)lParam; ep->hSelectPanel = hDlg; - SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); + SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); // Set up the editing level selector LoadImages(); iToolbar = GetICustToolbar(GetDlgItem(hDlg, IDC_SELTYPE)); @@ -137,7 +137,7 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR { BOOL needRedraw = FALSE; switch (LOWORD(wParam)) - { + { case EP_VERTEX: if (ep->GetSubobjectLevel() == EP_VERTEX) ep->ip->SetSubObjectLevel(PO_OBJECT); @@ -205,7 +205,7 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR if (((LPNMHDR)lParam)->code == TTN_NEEDTEXT) { LPTOOLTIPTEXT lpttt; - lpttt =(LPTOOLTIPTEXT)lParam; + lpttt =(LPTOOLTIPTEXT)lParam; switch (lpttt->hdr.idFrom) { case EP_VERTEX: @@ -225,19 +225,19 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR break; } - + return FALSE; } // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void EditPatchMod::SetOpsDlgEnables() +void EditPatchMod::SetOpsDlgEnables() { if (!hOpsPanel) return; - + nlassert(ip); - + // Disconnect right-click and delete mechanisms ip->GetRightClickMenuManager()->Unregister(&pMenu); ip->UnRegisterDeleteUser(&pDel); @@ -333,7 +333,7 @@ void EditPatchMod::SetOpsDlgEnables() // Enable/disable right-click and delete mechanisms if (!oType) - { + { pMenu.SetMod(this); ip->GetRightClickMenuManager()->Register(&pMenu); pDel.SetMod(this); @@ -349,19 +349,19 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM if (!ep && message != WM_INITDIALOG) return FALSE; - + ISpinnerControl *spin; ICustButton *ebut; switch (message) { - case WM_INITDIALOG: + case WM_INITDIALOG: { ep =(EditPatchMod *)lParam; ep->hOpsPanel = hDlg; for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++) SendMessage(GetDlgItem(hDlg, i), CC_COMMAND, CC_CMD_SET_TYPE, CBT_CHECK); - SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); + SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); ICustButton *but = GetICustButton(GetDlgItem(hDlg, IDC_ATTACH)); but->SetHighlightColor(GREEN_WASH); but->SetType(CBT_CHECK); @@ -401,12 +401,12 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE)); EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE)); EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE)); - + // New EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), IsDlgButtonChecked(hDlg, IDC_TILE_MODE)); EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), IsDlgButtonChecked(hDlg, IDC_TILE_MODE)); EnableWindow (GetDlgItem (hDlg, IDC_KEEP_MAPPING), IsDlgButtonChecked(hDlg, IDC_TILE_MODE)); - + // New EnableWindow (GetDlgItem (hDlg, IDC_TRANSITION), IsDlgButtonChecked(hDlg, IDC_TILE_MODE)); EnableWindow (GetDlgItem (hDlg, IDC_TRANSITIONSPINNER), IsDlgButtonChecked(hDlg, IDC_TILE_MODE)); @@ -494,7 +494,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM ep->ip->UnRegisterDeleteUser(&pDel); ep->ip->GetRightClickMenuManager()->Unregister(&pMenu); return FALSE; - + case CC_SPINNER_CHANGE: switch (LOWORD(wParam)) { @@ -544,7 +544,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM } ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END); - } else + } else { ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_INTERACTIVE); } @@ -562,18 +562,18 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM int sm =0; int sm2 = 0; if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH)) - sm = 0; + sm = 0; else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH2)) - sm = 1; + sm = 1; else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH3)) - sm = 2; + sm = 2; if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH4)) - sm2 = 0; + sm2 = 0; else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH5)) - sm2 = 1; + sm2 = 1; else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH6)) - sm2 = 2; + sm2 = 2; spin = GetISpinner(GetDlgItem(hDlg, IDC_EP_OUTLINESPINNER)); ep->Bevel(ep->ip->GetTime(), spin->GetFVal(), sm, sm2); @@ -588,7 +588,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM } ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END); - } else + } else { ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_INTERACTIVE); } @@ -641,7 +641,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM case WM_COMMAND: switch (LOWORD(wParam)) - { + { // Subdivision // watje 3-18-99 case IDC_SHOW_INTERIOR_FACES: @@ -654,18 +654,18 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM { BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_TILE_MODE)==BST_CHECKED); ep->SetTileMode (bCheck!=0); - + // Old EnableWindow (GetDlgItem (hDlg, IDC_STEPS), !bCheck); EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck); EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck); EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck); - + // New EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck); EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck); EnableWindow (GetDlgItem (hDlg, IDC_KEEP_MAPPING), bCheck); - + // New EnableWindow (GetDlgItem (hDlg, IDC_TRANSITION), bCheck); EnableWindow (GetDlgItem (hDlg, IDC_TRANSITIONSPINNER), bCheck); @@ -731,7 +731,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM ep->ip->SetStdCommandMode(CID_OBJMOVE); else ep->ip->SetCommandMode(ep->bevelMode); break; - + case IDC_TURN: nlassert (ep->GetSubobjectLevel()==PO_PATCH); ep->DoPatchTurn(true); @@ -772,7 +772,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM case IDC_DETACHREORIENT: patchDetachReorient = IsDlgButtonChecked(hDlg, IDC_DETACHREORIENT); break; - case IDC_ATTACH: + case IDC_ATTACH: { ModContextList mcList; INodeTab nodes; @@ -798,7 +798,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM } break; } - + return FALSE; } diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp index 01b85a6ab..a720a5911 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/DllEntry.cpp @@ -16,7 +16,7 @@ using namespace NLMISC; #endif /** public functions **/ -BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) { // initialize nel context if (!NLMISC::INelContext::isContextInitialised()) @@ -25,13 +25,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) nldebug("NeL Patch Paint: DllMain"); NLMISC::CSheetId::initWithoutSheet(); } - + hInstance = hinstDLL; - if ( !controlsInit ) + if ( !controlsInit ) { controlsInit = TRUE; - + // jaguar controls #if MAX_VERSION_MAJOR < 14 InitCustomControls(hInstance); @@ -42,7 +42,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) Ctl3dRegister(hinstDLL); Ctl3dAutoSubclass(hinstDLL); #endif - + // initialize Chicago controls InitCommonControls(); } @@ -66,8 +66,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) //------------------------------------------------------ __declspec( dllexport ) const TCHAR * -LibDescription() -{ +LibDescription() +{ return _T("NeL patch painter"); } @@ -109,7 +109,7 @@ LibClassDesc(int i) { // Return version so can detect obsolete DLLs -__declspec( dllexport ) ULONG +__declspec( dllexport ) ULONG LibVersion() { return VERSION_3DSMAX; } // Let the plug-in register itself for deferred loading diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_rollup.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_rollup.cpp index 5f7723bde..e225adaa4 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_rollup.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_rollup.cpp @@ -28,13 +28,13 @@ extern void LoadImages(); // ------------------------------------------------------------------------------------------------------------------------------------------------------ -void PaintPatchMod::SetOpsDlgEnables() +void PaintPatchMod::SetOpsDlgEnables() { if (!hOpsPanel) return; - + nlassert(ip); - + ICustButton *but; but = GetICustButton(GetDlgItem(hOpsPanel, IDC_PAINT)); @@ -52,12 +52,12 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM switch (message) { - case WM_INITDIALOG: + case WM_INITDIALOG: { ep =(PaintPatchMod *)lParam; ep->hOpsPanel = hDlg; - SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); + SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep); CheckDlgButton(hDlg, IDC_INCLUDE_MESHES, ep->includeMeshes); CheckDlgButton(hDlg, IDC_PRELOAD_TILES, ep->preloadTiles); @@ -67,7 +67,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM case WM_COMMAND: switch (LOWORD(wParam)) - { + { case IDC_INCLUDE_MESHES: { BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_INCLUDE_MESHES)==BST_CHECKED); @@ -86,7 +86,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM } break; } - + return FALSE; }