⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlgtextureformat.cpp

📁 混乱竞技场的全套代码,客户端资源可以网上搜
💻 CPP
字号:
// DlgTextureFormat.cpp : implementation file
//

#include "stdafx.h"
#include "gstools.h"
#include "DlgTextureFormat.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgTextureFormat dialog


CDlgTextureFormat::CDlgTextureFormat(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgTextureFormat::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgTextureFormat)
	m_fScale = 1.0f;
	m_nFmt = -1;
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	m_dwMipMap	= 0;
}


void CDlgTextureFormat::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgTextureFormat)
	DDX_Text(pDX, ID_EDIT_SCALE, m_fScale);
	DDV_MinMaxFloat(pDX, m_fScale, 0.2f, 10.f);
	DDX_Radio(pDX, IDC_RADIO1, m_nFmt);
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgTextureFormat, CDialog)
	//{{AFX_MSG_MAP(CDlgTextureFormat)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgTextureFormat message handlers
void CDlgTextureFormat::OnOK() 
{
	// TODO: Add extra validation here
	
	UpdateData();

	switch(m_nFmt)
	{
	case	0:
		m_dxsf	= D3DX_SF_A8R8G8B8;
		break;
	case	1:
		m_dxsf	= D3DX_SF_A4R4G4B4;
		break;
	case	2:
		m_dxsf	= D3DX_SF_A1R5G5B5;
		break;
	case	3:
		m_dxsf	= D3DX_SF_DXT1;
		break;
	case	4:
		m_dxsf	= D3DX_SF_DXT3;
		break;
	case	5:
		m_dxsf	= D3DX_SF_DXT3;
		break;
	case	6:
		m_dxsf	= D3DX_SF_DXT3;
		break;
	case	7:
		m_dxsf	= D3DX_SF_DXT5;
		break;
	}


	CDialog::OnOK();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -