Skip to content

Commit 87e1def

Browse files
committed
Cleaned up reclass code generation type definitions.
1 parent 2d0e8dc commit 87e1def

11 files changed

+203
-200
lines changed

ReClass/DialogEdit.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ BOOL CDialogEdit::Create( LPCTSTR lpszTemplateName, CWnd* pParentWnd )
8787
return CDialogEx::Create( lpszTemplateName, pParentWnd );
8888
}
8989

90-
void CDialogEdit::InitialiseEditor( )
90+
void CDialogEdit::InitializeEditor( )
9191
{
9292
// Punt if we already have a window
9393
if (::IsWindow( m_Edit.GetSafeHwnd( ) ))
@@ -154,7 +154,7 @@ BOOL CDialogEdit::OnInitDialog( )
154154

155155
SetWindowText( Title );
156156
// Create the Scintilla editor
157-
InitialiseEditor( );
157+
InitializeEditor( );
158158
m_Edit.SetText( Text );
159159

160160
ShowWindow( SW_NORMAL );
@@ -165,7 +165,6 @@ BOOL CDialogEdit::OnInitDialog( )
165165
return FALSE; // return TRUE unless you set the focus to a control
166166
}
167167

168-
169168
void CDialogEdit::OnCancel( )
170169
{
171170
// Get text

ReClass/DialogEdit.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ class CDialogEdit : public CDialogEx {
1515
// Sets a Scintilla style
1616
void SetStyle( int style, COLORREF fore, COLORREF back = RGB( 255, 255, 255 ), int size = -1, const char* face = 0 );
1717

18-
void InitialiseEditor( );
18+
void InitializeEditor( );
1919
void SizeEditor( );
2020

21+
enum { IDD = IDD_DIALOG_EDIT };
22+
23+
protected:
2124
HWND m_hEditWindow;
2225
CScintillaEdit m_Edit;
2326

24-
enum { IDD = IDD_DIALOG_EDIT };
25-
2627
protected:
2728
virtual void DoDataExchange( CDataExchange* pDX ); // DDX/DDV support
2829

ReClass/DialogTypes.cpp

+36-37
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ IMPLEMENT_DYNAMIC( CDialogTypes, CDialogEx )
1313
CDialogTypes::CDialogTypes( CWnd* pParent /*=NULL*/ )
1414
: CDialogEx( CDialogTypes::IDD, pParent )
1515
{
16-
1716
}
1817

1918
CDialogTypes::~CDialogTypes( )
@@ -27,10 +26,10 @@ void CDialogTypes::DoDataExchange( CDataExchange* pDX )
2726
DDX_Control( pDX, IDC_EDIT_INT32, m_Int32 );
2827
DDX_Control( pDX, IDC_EDIT_INT16, m_Int16 );
2928
DDX_Control( pDX, IDC_EDIT_INT8, m_Int8 );
30-
DDX_Control( pDX, IDC_EDIT_QWORD, m_QWord );
31-
DDX_Control( pDX, IDC_EDIT_DWORD, m_DWord );
29+
DDX_Control( pDX, IDC_EDIT_QWORD, m_Qword );
30+
DDX_Control( pDX, IDC_EDIT_DWORD, m_Dword );
3231
DDX_Control( pDX, IDC_EDIT_WORD, m_Word );
33-
DDX_Control( pDX, IDC_EDIT_BYTE, m_BYTE );
32+
DDX_Control( pDX, IDC_EDIT_BYTE, m_Byte );
3433
DDX_Control( pDX, IDC_EDIT_VEC2, m_Vec2 );
3534
DDX_Control( pDX, IDC_EDIT_VEC3, m_Vec3 );
3635
DDX_Control( pDX, IDC_EDIT_QUAT, m_Quat );
@@ -50,48 +49,48 @@ BOOL CDialogTypes::OnInitDialog( )
5049
{
5150
CDialogEx::OnInitDialog( );
5251

53-
m_Hex.SetWindowText( g_tdHex );
52+
m_Hex.SetWindowText( g_Typedefs.Hex );
5453

55-
m_Int64.SetWindowText( g_tdInt64 );
56-
m_Int32.SetWindowText( g_tdInt32 );
57-
m_Int16.SetWindowText( g_tdInt16 );
58-
m_Int8.SetWindowText( g_tdInt8 );
54+
m_Int64.SetWindowText( g_Typedefs.Int64 );
55+
m_Int32.SetWindowText( g_Typedefs.Int32 );
56+
m_Int16.SetWindowText( g_Typedefs.Int16 );
57+
m_Int8.SetWindowText( g_Typedefs.Int8 );
5958

60-
m_QWord.SetWindowText( g_tdQWORD );
61-
m_DWord.SetWindowText( g_tdDWORD );
62-
m_Word.SetWindowText( g_tdWORD );
63-
m_BYTE.SetWindowText( g_tdBYTE );
59+
m_Qword.SetWindowText( g_Typedefs.Qword );
60+
m_Dword.SetWindowText( g_Typedefs.Dword );
61+
m_Word.SetWindowText( g_Typedefs.Word );
62+
m_Byte.SetWindowText( g_Typedefs.Byte );
6463

65-
m_Vec2.SetWindowText( g_tdVec2 );
66-
m_Vec3.SetWindowText( g_tdVec3 );
67-
m_Quat.SetWindowText( g_tdQuat );
68-
m_Matrix.SetWindowText( g_tdMatrix );
69-
m_PChar.SetWindowText( g_tdPChar );
70-
m_PWChar.SetWindowText( g_tdPWChar );
64+
m_Vec2.SetWindowText( g_Typedefs.Vec2 );
65+
m_Vec3.SetWindowText( g_Typedefs.Vec3 );
66+
m_Quat.SetWindowText( g_Typedefs.Quat );
67+
m_Matrix.SetWindowText( g_Typedefs.Matrix );
68+
m_PChar.SetWindowText( g_Typedefs.PChar );
69+
m_PWChar.SetWindowText( g_Typedefs.PWChar );
7170

7271
return TRUE;
7372
}
7473

7574
void CDialogTypes::OnOK( )
7675
{
77-
m_Hex.GetWindowText( g_tdHex );
78-
79-
m_Int64.GetWindowText( g_tdInt64 );
80-
m_Int32.GetWindowText( g_tdInt32 );
81-
m_Int16.GetWindowText( g_tdInt16 );
82-
m_Int8.GetWindowText( g_tdInt8 );
83-
84-
m_QWord.GetWindowText( g_tdQWORD );
85-
m_DWord.GetWindowText( g_tdDWORD );
86-
m_Word.GetWindowText( g_tdWORD );
87-
m_BYTE.GetWindowText( g_tdBYTE );
88-
89-
m_Vec2.GetWindowText( g_tdVec2 );
90-
m_Vec3.GetWindowText( g_tdVec3 );
91-
m_Quat.GetWindowText( g_tdQuat );
92-
m_Matrix.GetWindowText( g_tdMatrix );
93-
m_PChar.GetWindowText( g_tdPChar );
94-
m_PWChar.GetWindowText( g_tdPWChar );
76+
m_Hex.GetWindowText( g_Typedefs.Hex );
77+
78+
m_Int64.GetWindowText( g_Typedefs.Int64 );
79+
m_Int32.GetWindowText( g_Typedefs.Int32 );
80+
m_Int16.GetWindowText( g_Typedefs.Int16 );
81+
m_Int8.GetWindowText( g_Typedefs.Int8 );
82+
83+
m_Qword.GetWindowText( g_Typedefs.Qword );
84+
m_Dword.GetWindowText( g_Typedefs.Dword );
85+
m_Word.GetWindowText( g_Typedefs.Word );
86+
m_Byte.GetWindowText( g_Typedefs.Byte );
87+
88+
m_Vec2.GetWindowText( g_Typedefs.Vec2 );
89+
m_Vec3.GetWindowText( g_Typedefs.Vec3 );
90+
m_Quat.GetWindowText( g_Typedefs.Quat );
91+
m_Matrix.GetWindowText( g_Typedefs.Matrix );
92+
m_PChar.GetWindowText( g_Typedefs.PChar );
93+
m_PWChar.GetWindowText( g_Typedefs.PWChar );
9594

9695
CDialogEx::OnOK( );
9796
}

ReClass/DialogTypes.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
class CDialogTypes : public CDialogEx {
88
DECLARE_DYNAMIC( CDialogTypes )
9-
109
public:
1110
CDialogTypes( CWnd* pParent = NULL ); // standard constructor
1211
virtual ~CDialogTypes( );
@@ -28,10 +27,10 @@ class CDialogTypes : public CDialogEx {
2827
CEdit m_Int32;
2928
CEdit m_Int16;
3029
CEdit m_Int8;
31-
CEdit m_QWord;
32-
CEdit m_DWord;
30+
CEdit m_Qword;
31+
CEdit m_Dword;
3332
CEdit m_Word;
34-
CEdit m_BYTE;
33+
CEdit m_Byte;
3534
CEdit m_Vec2;
3635
CEdit m_Vec3;
3736
CEdit m_Quat;

0 commit comments

Comments
 (0)