view src/win32/GBCheatsDlg.h @ 3:b05d00f19d80

fix some formatting
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:33:11 -0600
parents f9f4f1b99eed
children
line wrap: on
line source
1 #if !defined(AFX_GBCHEATSDLG_H__8ECCB04A_AB75_4552_8625_C6FBF30A95D9__INCLUDED_)
2 #define AFX_GBCHEATSDLG_H__8ECCB04A_AB75_4552_8625_C6FBF30A95D9__INCLUDED_
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7 // GBCheats.h : header file
8 //
10 /////////////////////////////////////////////////////////////////////////////
11 // GBCheatSearch dialog
13 struct WinGbCheatsData
14 {
15 int bank;
16 u16 addr;
17 char address[9];
18 char oldValue[12];
19 char newValue[12];
20 };
22 class GBCheatSearch : public CDialog
23 {
24 // Construction
25 public:
26 afx_msg void OnSizeType(UINT id);
27 afx_msg void OnNumberType(UINT id);
28 afx_msg void OnSearchType(UINT id);
29 afx_msg void OnValueType(UINT id);
30 void addChanges(bool showMsg);
31 void addChange(int index, int bank, u16 address, int offset, u32 oldValue, u32 newValue);
32 int getBank(u16 addr, int j);
33 GBCheatSearch(CWnd*pParent = NULL); // standard constructor
34 ~GBCheatSearch();
36 // Dialog Data
37 //{{AFX_DATA(GBCheatSearch)
38 enum { IDD = IDD_CHEATS };
39 CEdit m_value;
40 CListCtrl m_list;
41 int searchType;
42 int numberType;
43 int sizeType;
44 BOOL updateValues;
45 int valueType;
46 //}}AFX_DATA
48 // Overrides
49 // ClassWizard generated virtual function overrides
50 //{{AFX_VIRTUAL(GBCheatSearch)
51 protected:
52 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support
53 //}}AFX_VIRTUAL
55 // Implementation
56 protected:
57 WinGbCheatsData *data;
59 // Generated message map functions
60 //{{AFX_MSG(GBCheatSearch)
61 afx_msg void OnOk();
62 afx_msg void OnAddCheat();
63 afx_msg void OnSearch();
64 afx_msg void OnStart();
65 afx_msg void OnUpdate();
66 virtual BOOL OnInitDialog();
67 afx_msg void OnGetdispinfoCheatList(NMHDR*pNMHDR, LRESULT*pResult);
68 afx_msg void OnItemchangedCheatList(NMHDR*pNMHDR, LRESULT*pResult);
69 //}}AFX_MSG
70 DECLARE_MESSAGE_MAP()
71 public:
72 afx_msg void OnClose();
73 afx_msg void OnBnClickedCheatrefreshbutton();
74 };
76 /////////////////////////////////////////////////////////////////////////////
77 // AddGBCheat dialog
79 class AddGBCheat : public CDialog
80 {
81 // Construction
82 public:
83 afx_msg void OnSizeType(UINT id);
84 afx_msg void OnNumberType(UINT id);
85 bool addCheat();
86 AddGBCheat(u32 addr, CWnd*pParent = NULL); // standard constructor
88 // Dialog Data
89 //{{AFX_DATA(AddGBCheat)
90 enum { IDD = IDD_ADD_CHEAT };
91 CEdit m_value;
92 CEdit m_address;
93 CEdit m_desc;
94 int sizeType;
95 int numberType;
96 //}}AFX_DATA
98 // Overrides
99 // ClassWizard generated virtual function overrides
100 //{{AFX_VIRTUAL(AddGBCheat)
101 protected:
102 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support
103 //}}AFX_VIRTUAL
105 // Implementation
106 protected:
107 u32 address;
109 // Generated message map functions
110 //{{AFX_MSG(AddGBCheat)
111 afx_msg void OnCancel();
112 afx_msg void OnOk();
113 virtual BOOL OnInitDialog();
114 //}}AFX_MSG
115 DECLARE_MESSAGE_MAP()
116 };
117 /////////////////////////////////////////////////////////////////////////////
118 // GBCheatList dialog
120 class GBCheatList : public CDialog
121 {
122 // Construction
123 public:
124 void refresh();
125 GBCheatList(CWnd*pParent = NULL); // standard constructor
127 // Dialog Data
128 //{{AFX_DATA(GBCheatList)
129 enum { IDD = IDD_GB_CHEAT_LIST };
130 CListCtrl m_list;
131 //}}AFX_DATA
133 // Overrides
134 // ClassWizard generated virtual function overrides
135 //{{AFX_VIRTUAL(GBCheatList)
136 protected:
137 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support
138 //}}AFX_VIRTUAL
140 // Implementation
141 protected:
142 bool duringRefresh;
144 // Generated message map functions
145 //{{AFX_MSG(GBCheatList)
146 afx_msg void OnOk();
147 afx_msg void OnAddGgCheat();
148 afx_msg void OnAddGsCheat();
149 afx_msg void OnEnable();
150 afx_msg void OnRemove();
151 afx_msg void OnRemoveAll();
152 afx_msg void OnItemchangedCheatList(NMHDR*pNMHDR, LRESULT*pResult);
153 virtual BOOL OnInitDialog();
154 //}}AFX_MSG
155 DECLARE_MESSAGE_MAP()
156 };
158 /////////////////////////////////////////////////////////////////////////////
159 // AddGBCode dialog
161 class AddGBCode : public CDialog
162 {
163 // Construction
164 public:
165 AddGBCode(bool(*verify)(const char *, const char *), int, const char *, CWnd*pParent = NULL); // standard constructor
167 // Dialog Data
168 //{{AFX_DATA(AddGBCode)
169 enum { IDD = IDD_ADD_CHEAT_DLG };
170 CEdit m_desc;
171 CEdit m_code;
172 //}}AFX_DATA
174 // Overrides
175 // ClassWizard generated virtual function overrides
176 //{{AFX_VIRTUAL(AddGBCode)
177 protected:
178 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support
179 //}}AFX_VIRTUAL
181 // Implementation
182 protected:
183 int addLength;
184 CString addTitle;
185 bool (*addVerify)(const char *, const char *);
187 // Generated message map functions
188 //{{AFX_MSG(AddGBCode)
189 afx_msg void OnOk();
190 afx_msg void OnCancel();
191 virtual BOOL OnInitDialog();
192 //}}AFX_MSG
193 DECLARE_MESSAGE_MAP()
194 };
195 //{{AFX_INSERT_LOCATION}}
196 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
198 #endif // !defined(AFX_GBCHEATSDLG_H__8ECCB04A_AB75_4552_8625_C6FBF30A95D9__INCLUDED_)