dsrc isn't necessary for this repo
[client-tools.git] / src / external / 3rd / application / DXTex / dxtex.h
blobebcbebafa5fc1efb3e7f11addbe60210c7bdbbfc
1 // dxtex.h : main header file for the DXTEX application
2 //
4 #if !defined(AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_)
5 #define AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_
7 #if _MSC_VER > 1000
8 #pragma once
9 #endif // _MSC_VER > 1000
11 #ifndef __AFXWIN_H__
12 #error include 'stdafx.h' before including this file for PCH
13 #endif
15 #include "resource.h" // main symbols
17 #ifndef ReleasePpo
18 #define ReleasePpo(ppo) \
19 if (*(ppo) != NULL) \
20 { \
21 (*(ppo))->Release(); \
22 *(ppo) = NULL; \
23 } \
24 else (VOID)0
25 #endif
27 /////////////////////////////////////////////////////////////////////////////
28 // CDxtexDocManager:
29 // I override this class to customize DoPromptFileName to allow importing of
30 // BMPs as well as DDSs into CDxtexDocs.
32 class CDxtexDocManager : public CDocManager
34 public:
35 virtual BOOL DoPromptFileName(CString& fileName, UINT nIDSTitle,
36 DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate);
39 /////////////////////////////////////////////////////////////////////////////
40 // CDxtexCommandLineInfo:
41 // I override this class to handle custom command-line options
43 class CDxtexCommandLineInfo : public CCommandLineInfo
45 public:
46 CString m_strFileNameAlpha;
47 CString m_strFileNameSave;
48 D3DFORMAT m_fmt;
49 BOOL m_bAlphaComing;
50 BOOL m_bMipMap;
52 CDxtexCommandLineInfo::CDxtexCommandLineInfo(VOID);
53 virtual void ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast);
57 /////////////////////////////////////////////////////////////////////////////
58 // CDxtexApp:
59 // See dxtex.cpp for the implementation of this class
62 class CDxtexApp : public CWinApp
64 public:
65 CDxtexApp();
66 virtual ~CDxtexApp();
67 LPDIRECT3D9 Pd3d(VOID) { return m_pd3d; }
68 LPDIRECT3DDEVICE9 Pd3ddev(VOID) { return m_pd3ddev; }
69 BOOL HandlePossibleLostDevice(VOID);
70 VOID DeviceIsLost(VOID) { m_bDeviceLost = TRUE; }
71 HRESULT InvalidateDeviceObjects(VOID);
72 HRESULT RestoreDeviceObjects(VOID);
74 // Overrides
75 // ClassWizard generated virtual function overrides
76 //{{AFX_VIRTUAL(CDxtexApp)
77 public:
78 virtual BOOL InitInstance();
79 //}}AFX_VIRTUAL
81 // Implementation
82 //{{AFX_MSG(CDxtexApp)
83 afx_msg void OnAppAbout();
84 // NOTE - the ClassWizard will add and remove member functions here.
85 // DO NOT EDIT what you see in these blocks of generated code !
86 //}}AFX_MSG
87 DECLARE_MESSAGE_MAP()
88 private:
89 LPDIRECT3D9 m_pd3d;
90 LPDIRECT3DDEVICE9 m_pd3ddev;
91 BOOL m_bDeviceLost;
95 /////////////////////////////////////////////////////////////////////////////
97 //{{AFX_INSERT_LOCATION}}
98 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
100 #endif // !defined(AFX_DXTX_H__712C53C7_D63B_11D1_A8B5_00C04FC2DC22__INCLUDED_)