Changed: Minor changes

This commit is contained in:
kervala 2016-12-02 16:30:10 +01:00
parent 8eb24e71e3
commit 0fb1fa5cc0
7 changed files with 65 additions and 51 deletions

View file

@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdligo.h" #include "stdligo.h"
#include "ligo_error.h" #include "nel/ligo/ligo_error.h"
namespace NLLIGO namespace NLLIGO
{ {

View file

@ -73,7 +73,7 @@ BOOL CAboutDialog::OnInitDialog()
if (VerQueryValue (pInfo, _T("\\"), (void**)&versionTab, &versionSize)) if (VerQueryValue (pInfo, _T("\\"), (void**)&versionTab, &versionSize))
{ {
// Get the pointer on the structure // Get the pointer on the structure
VS_FIXEDFILEINFO *info=(VS_FIXEDFILEINFO*)versionTab; VS_FIXEDFILEINFO *info = (VS_FIXEDFILEINFO*)versionTab;
// Setup version number // Setup version number
TCHAR version[512]; TCHAR version[512];

View file

@ -1885,7 +1885,7 @@ bool CObjectViewer::loadInstanceGroup(const std::string &igFilename)
if (file.open (igFilename)) if (file.open (igFilename))
{ {
// Shape pointer // Shape pointer
NL3D::CInstanceGroup *ig= new NL3D::CInstanceGroup; NL3D::CInstanceGroup *ig = new NL3D::CInstanceGroup;
try try
{ {

View file

@ -72,19 +72,23 @@ INT_PTR CALLBACK OptionsDialogCallback (
{ {
CenterWindow( hwndDlg, theCNelExport._Ip->GetMAXHWnd() ); CenterWindow( hwndDlg, theCNelExport._Ip->GetMAXHWnd() );
ShowWindow( hwndDlg, TRUE ); ShowWindow( hwndDlg, TRUE );
// Initialize from theExportSceneStruct // Initialize from theExportSceneStruct
if( theExportSceneStruct.bExcludeNonSelected ) if( theExportSceneStruct.bExcludeNonSelected )
SendMessage( GetDlgItem(hwndDlg,IDC_EXCLUDE), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_EXCLUDE), BM_SETCHECK, BST_CHECKED, 0 );
else else
SendMessage( GetDlgItem(hwndDlg,IDC_EXCLUDE), BM_SETCHECK, BST_UNCHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_EXCLUDE), BM_SETCHECK, BST_UNCHECKED, 0 );
if( theExportSceneStruct.bExportLighting ) if( theExportSceneStruct.bExportLighting )
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
else else
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_SETCHECK, BST_UNCHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_SETCHECK, BST_UNCHECKED, 0 );
if( theExportSceneStruct.OutputLightmapLog ) if( theExportSceneStruct.OutputLightmapLog )
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_SETCHECK, BST_CHECKED, 0 );
else else
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_SETCHECK, BST_UNCHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_SETCHECK, BST_UNCHECKED, 0 );
if( theExportSceneStruct.bShadow) if( theExportSceneStruct.bShadow)
SendMessage( GetDlgItem(hwndDlg,IDC_SHADOW), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_SHADOW), BM_SETCHECK, BST_CHECKED, 0 );
else else
@ -94,6 +98,7 @@ INT_PTR CALLBACK OptionsDialogCallback (
if( theExportSceneStruct.nExportLighting == 0 ) if( theExportSceneStruct.nExportLighting == 0 )
SendMessage( GetDlgItem(hwndDlg,IDC_RADIONORMALEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_RADIONORMALEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
if( theExportSceneStruct.nExportLighting == 1 ) if( theExportSceneStruct.nExportLighting == 1 )
SendMessage( GetDlgItem(hwndDlg,IDC_RADIORADIOSITYEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_RADIORADIOSITYEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
@ -101,12 +106,16 @@ INT_PTR CALLBACK OptionsDialogCallback (
if( theExportSceneStruct.nOverSampling == 1 ) if( theExportSceneStruct.nOverSampling == 1 )
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS1), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS1), BM_SETCHECK, BST_CHECKED, 0 );
if( theExportSceneStruct.nOverSampling == 2 ) if( theExportSceneStruct.nOverSampling == 2 )
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS2), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS2), BM_SETCHECK, BST_CHECKED, 0 );
if( theExportSceneStruct.nOverSampling == 4 ) if( theExportSceneStruct.nOverSampling == 4 )
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS3), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS3), BM_SETCHECK, BST_CHECKED, 0 );
if( theExportSceneStruct.nOverSampling == 8 ) if( theExportSceneStruct.nOverSampling == 8 )
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS4), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS4), BM_SETCHECK, BST_CHECKED, 0 );
if( theExportSceneStruct.bShowLumel ) if( theExportSceneStruct.bShowLumel )
SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_SETCHECK, BST_CHECKED, 0 ); SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_SETCHECK, BST_CHECKED, 0 );
else else
@ -153,14 +162,17 @@ INT_PTR CALLBACK OptionsDialogCallback (
theExportSceneStruct.bExcludeNonSelected = true; theExportSceneStruct.bExcludeNonSelected = true;
else else
theExportSceneStruct.bExcludeNonSelected = false; theExportSceneStruct.bExcludeNonSelected = false;
if( SendMessage( GetDlgItem(hwndDlg,IDC_SHADOW), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_SHADOW), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.bShadow = true; theExportSceneStruct.bShadow = true;
else else
theExportSceneStruct.bShadow = false; theExportSceneStruct.bShadow = false;
if( SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.bExportLighting = true; theExportSceneStruct.bExportLighting = true;
else else
theExportSceneStruct.bExportLighting = false; theExportSceneStruct.bExportLighting = false;
if( SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.OutputLightmapLog = true; theExportSceneStruct.OutputLightmapLog = true;
else else
@ -172,6 +184,7 @@ INT_PTR CALLBACK OptionsDialogCallback (
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIONORMALEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIONORMALEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.nExportLighting = 0; theExportSceneStruct.nExportLighting = 0;
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIORADIOSITYEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIORADIOSITYEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.nExportLighting = 1; theExportSceneStruct.nExportLighting = 1;
@ -180,16 +193,21 @@ INT_PTR CALLBACK OptionsDialogCallback (
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS1), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS1), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.nOverSampling = 1; theExportSceneStruct.nOverSampling = 1;
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS2), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS2), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.nOverSampling = 2; theExportSceneStruct.nOverSampling = 2;
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS3), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS3), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.nOverSampling = 4; theExportSceneStruct.nOverSampling = 4;
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS4), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS4), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.nOverSampling = 8; theExportSceneStruct.nOverSampling = 8;
if( SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_GETCHECK, 0, 0 ) == BST_CHECKED ) if( SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
theExportSceneStruct.bShowLumel = true; theExportSceneStruct.bShowLumel = true;
else else
theExportSceneStruct.bShowLumel = false; theExportSceneStruct.bShowLumel = false;
theExportSceneStruct.bExportBgColor = ( SendMessage( GetDlgItem(hwndDlg,IDC_EXPORT_BG_COLOR), BM_GETCHECK, 0, 0 ) == BST_CHECKED ); theExportSceneStruct.bExportBgColor = ( SendMessage( GetDlgItem(hwndDlg,IDC_EXPORT_BG_COLOR), BM_GETCHECK, 0, 0 ) == BST_CHECKED );
// SurfaceLighting // SurfaceLighting
@ -813,7 +831,8 @@ void CNelExport::initOptions()
if( CFile::fileExists(sConfigFileName) ) if( CFile::fileExists(sConfigFileName) )
{ {
// Serial the configuration // Serial the configuration
try { try
{
CIFile inputFile; CIFile inputFile;
if( inputFile.open(sConfigFileName) ) if( inputFile.open(sConfigFileName) )
{ {

View file

@ -338,8 +338,7 @@ static INT_PTR CALLBACK PickSetDlgProc(
Tab<TSTR*> &names = *((Tab < TSTR*>*)lParam); Tab<TSTR*> &names = *((Tab < TSTR*>*)lParam);
for (int i = 0; i < names.Count(); i++) for (int i = 0; i < names.Count(); i++)
{ {
int pos = SendDlgItemMessage(hWnd, IDC_NS_LIST, LB_ADDSTRING, 0, int pos = SendDlgItemMessage(hWnd, IDC_NS_LIST, LB_ADDSTRING, 0, (LPARAM)(TCHAR*)*names[i]->ToMCHAR());
(LPARAM)(TCHAR*)*names[i]);
SendDlgItemMessage(hWnd, IDC_NS_LIST, LB_SETITEMDATA, pos, i); SendDlgItemMessage(hWnd, IDC_NS_LIST, LB_SETITEMDATA, pos, i);
} }
break; break;

View file

@ -71,18 +71,15 @@ void EditPatchMod::RefreshSelType()
*/ */
if (selLevel == EP_PATCH) if (selLevel == EP_PATCH)
{ {
hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF), hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF), PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
} }
if (selLevel == EP_TILE) if (selLevel == EP_TILE)
{ {
hTilePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_TILE), hTilePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_TILE), PatchTileDlgProc, _M("Tile Properties"), (LPARAM) this, rsTile ? 0 : APPENDROLL_CLOSED);
PatchTileDlgProc, "Tile Properties", (LPARAM) this, rsTile ? 0 : APPENDROLL_CLOSED);
} }
if (selLevel == EP_EDGE) if (selLevel == EP_EDGE)
{ {
hEdgePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_EDGE), hEdgePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_EDGE), PatchEdgeDlgProc, _M("Edge Properties"), (LPARAM) this, rsEdge ? 0 : APPENDROLL_CLOSED);
PatchEdgeDlgProc, "Edge Properties", (LPARAM) this, rsEdge ? 0 : APPENDROLL_CLOSED);
} }
SetSurfDlgEnables(); SetSurfDlgEnables();
SetTileDlgEnables(); SetTileDlgEnables();

View file

@ -160,8 +160,7 @@ void EditPatchMod::BeginEditParams(IObjParam *ip, ULONG flags, Animatable *prev)
*/ */
if (selLevel == EP_PATCH) if (selLevel == EP_PATCH)
{ {
hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF), hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF), PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
} }
else else
hSurfPanel = NULL; hSurfPanel = NULL;