DragonNest/Client/ActorEternity/ExportUtil.cpp
Cussrro 47f7895977 Revert "修复编码问题"
This reverts commit 9e69c01767.
2024-12-21 10:04:04 +08:00

47 lines
1 KiB
C++

#include "Stdafx.h"
#include "Max.h"
int _GetCheckBox( HWND hWnd, int CheckID )
{
HWND HBox = GetDlgItem( hWnd, CheckID );
int TempResult = ( ( SendMessage( HBox, BM_GETCHECK, 0 , 0 ) == BST_CHECKED ) ? 1 : 0 ) ;
return TempResult;
}
int _SetCheckBox( HWND hWnd,int CheckID, int Switch ) // Switch: 0 off, 1 marked, 2 greyed...
{
HWND HBox = GetDlgItem(hWnd, CheckID);
return( SendMessage( HBox, BM_SETCHECK, Switch, 0 ) );
}
int GetTextureChannelCount( Mtl *pMtl )
{
int i, nMaxChannel=1;
StdUVGen *uvGen;
for( i = 0;i < pMtl->NumSubTexmaps(); i++ )
{
Texmap *pSubTex = pMtl->GetSubTexmap( i );
if( ( pSubTex ) && ( pSubTex->ClassID() == Class_ID( BMTEX_CLASS_ID, 0 ) ) )
{
if( pMtl->ClassID() == Class_ID( DMTL_CLASS_ID, 0 ) )
{
if( !( ( StdMat * )pMtl )->MapEnabled( i ) )
{
continue;
}
}
uvGen = ( ( BitmapTex * )pSubTex )->GetUVGen();
if( uvGen )
{
if( uvGen->GetMapChannel() > nMaxChannel )
{
nMaxChannel = uvGen->GetMapChannel();
}
}
}
}
return nMaxChannel;
}