diff src/win32/GBCheatsDlg.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/GBCheatsDlg.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,198 @@
     1.4 +#if !defined(AFX_GBCHEATSDLG_H__8ECCB04A_AB75_4552_8625_C6FBF30A95D9__INCLUDED_)
     1.5 +#define AFX_GBCHEATSDLG_H__8ECCB04A_AB75_4552_8625_C6FBF30A95D9__INCLUDED_
     1.6 +
     1.7 +#if _MSC_VER > 1000
     1.8 +#pragma once
     1.9 +#endif // _MSC_VER > 1000
    1.10 +// GBCheats.h : header file
    1.11 +//
    1.12 +
    1.13 +/////////////////////////////////////////////////////////////////////////////
    1.14 +// GBCheatSearch dialog
    1.15 +
    1.16 +struct WinGbCheatsData
    1.17 +{
    1.18 +	int  bank;
    1.19 +	u16  addr;
    1.20 +	char address[9];
    1.21 +	char oldValue[12];
    1.22 +	char newValue[12];
    1.23 +};
    1.24 +
    1.25 +class GBCheatSearch : public CDialog
    1.26 +{
    1.27 +	// Construction
    1.28 +public:
    1.29 +	afx_msg void OnSizeType(UINT id);
    1.30 +	afx_msg void OnNumberType(UINT id);
    1.31 +	afx_msg void OnSearchType(UINT id);
    1.32 +	afx_msg void OnValueType(UINT id);
    1.33 +	void addChanges(bool showMsg);
    1.34 +	void addChange(int index, int bank, u16 address, int offset, u32 oldValue, u32 newValue);
    1.35 +	int getBank(u16 addr, int j);
    1.36 +	GBCheatSearch(CWnd*pParent = NULL);  // standard constructor
    1.37 +	~GBCheatSearch();
    1.38 +
    1.39 +	// Dialog Data
    1.40 +	//{{AFX_DATA(GBCheatSearch)
    1.41 +	enum { IDD = IDD_CHEATS };
    1.42 +	CEdit     m_value;
    1.43 +	CListCtrl m_list;
    1.44 +	int       searchType;
    1.45 +	int       numberType;
    1.46 +	int       sizeType;
    1.47 +	BOOL      updateValues;
    1.48 +	int       valueType;
    1.49 +	//}}AFX_DATA
    1.50 +
    1.51 +	// Overrides
    1.52 +	// ClassWizard generated virtual function overrides
    1.53 +	//{{AFX_VIRTUAL(GBCheatSearch)
    1.54 +protected:
    1.55 +	virtual void DoDataExchange(CDataExchange*pDX);   // DDX/DDV support
    1.56 +	//}}AFX_VIRTUAL
    1.57 +
    1.58 +	// Implementation
    1.59 +protected:
    1.60 +	WinGbCheatsData *data;
    1.61 +
    1.62 +	// Generated message map functions
    1.63 +	//{{AFX_MSG(GBCheatSearch)
    1.64 +	afx_msg void OnOk();
    1.65 +	afx_msg void OnAddCheat();
    1.66 +	afx_msg void OnSearch();
    1.67 +	afx_msg void OnStart();
    1.68 +	afx_msg void OnUpdate();
    1.69 +	virtual BOOL OnInitDialog();
    1.70 +	afx_msg void OnGetdispinfoCheatList(NMHDR*pNMHDR, LRESULT*pResult);
    1.71 +	afx_msg void OnItemchangedCheatList(NMHDR*pNMHDR, LRESULT*pResult);
    1.72 +	//}}AFX_MSG
    1.73 +	DECLARE_MESSAGE_MAP()
    1.74 +public:
    1.75 +	afx_msg void OnClose();
    1.76 +	afx_msg void OnBnClickedCheatrefreshbutton();
    1.77 +};
    1.78 +
    1.79 +/////////////////////////////////////////////////////////////////////////////
    1.80 +// AddGBCheat dialog
    1.81 +
    1.82 +class AddGBCheat : public CDialog
    1.83 +{
    1.84 +	// Construction
    1.85 +public:
    1.86 +	afx_msg void OnSizeType(UINT id);
    1.87 +	afx_msg void OnNumberType(UINT id);
    1.88 +	bool addCheat();
    1.89 +	AddGBCheat(u32 addr, CWnd*pParent = NULL);  // standard constructor
    1.90 +
    1.91 +	// Dialog Data
    1.92 +	//{{AFX_DATA(AddGBCheat)
    1.93 +	enum { IDD = IDD_ADD_CHEAT };
    1.94 +	CEdit m_value;
    1.95 +	CEdit m_address;
    1.96 +	CEdit m_desc;
    1.97 +	int   sizeType;
    1.98 +	int   numberType;
    1.99 +	//}}AFX_DATA
   1.100 +
   1.101 +	// Overrides
   1.102 +	// ClassWizard generated virtual function overrides
   1.103 +	//{{AFX_VIRTUAL(AddGBCheat)
   1.104 +protected:
   1.105 +	virtual void DoDataExchange(CDataExchange*pDX);   // DDX/DDV support
   1.106 +	//}}AFX_VIRTUAL
   1.107 +
   1.108 +	// Implementation
   1.109 +protected:
   1.110 +	u32 address;
   1.111 +
   1.112 +	// Generated message map functions
   1.113 +	//{{AFX_MSG(AddGBCheat)
   1.114 +	afx_msg void OnCancel();
   1.115 +	afx_msg void OnOk();
   1.116 +	virtual BOOL OnInitDialog();
   1.117 +	//}}AFX_MSG
   1.118 +	DECLARE_MESSAGE_MAP()
   1.119 +};
   1.120 +/////////////////////////////////////////////////////////////////////////////
   1.121 +// GBCheatList dialog
   1.122 +
   1.123 +class GBCheatList : public CDialog
   1.124 +{
   1.125 +	// Construction
   1.126 +public:
   1.127 +	void refresh();
   1.128 +	GBCheatList(CWnd*pParent = NULL);  // standard constructor
   1.129 +
   1.130 +	// Dialog Data
   1.131 +	//{{AFX_DATA(GBCheatList)
   1.132 +	enum { IDD = IDD_GB_CHEAT_LIST };
   1.133 +	CListCtrl m_list;
   1.134 +	//}}AFX_DATA
   1.135 +
   1.136 +	// Overrides
   1.137 +	// ClassWizard generated virtual function overrides
   1.138 +	//{{AFX_VIRTUAL(GBCheatList)
   1.139 +protected:
   1.140 +	virtual void DoDataExchange(CDataExchange*pDX);   // DDX/DDV support
   1.141 +	//}}AFX_VIRTUAL
   1.142 +
   1.143 +	// Implementation
   1.144 +protected:
   1.145 +	bool duringRefresh;
   1.146 +
   1.147 +	// Generated message map functions
   1.148 +	//{{AFX_MSG(GBCheatList)
   1.149 +	afx_msg void OnOk();
   1.150 +	afx_msg void OnAddGgCheat();
   1.151 +	afx_msg void OnAddGsCheat();
   1.152 +	afx_msg void OnEnable();
   1.153 +	afx_msg void OnRemove();
   1.154 +	afx_msg void OnRemoveAll();
   1.155 +	afx_msg void OnItemchangedCheatList(NMHDR*pNMHDR, LRESULT*pResult);
   1.156 +	virtual BOOL OnInitDialog();
   1.157 +	//}}AFX_MSG
   1.158 +	DECLARE_MESSAGE_MAP()
   1.159 +};
   1.160 +
   1.161 +/////////////////////////////////////////////////////////////////////////////
   1.162 +// AddGBCode dialog
   1.163 +
   1.164 +class AddGBCode : public CDialog
   1.165 +{
   1.166 +	// Construction
   1.167 +public:
   1.168 +	AddGBCode(bool(*verify)(const char *, const char *), int, const char *, CWnd*pParent = NULL);  // standard constructor
   1.169 +
   1.170 +	// Dialog Data
   1.171 +	//{{AFX_DATA(AddGBCode)
   1.172 +	enum { IDD = IDD_ADD_CHEAT_DLG };
   1.173 +	CEdit m_desc;
   1.174 +	CEdit m_code;
   1.175 +	//}}AFX_DATA
   1.176 +
   1.177 +	// Overrides
   1.178 +	// ClassWizard generated virtual function overrides
   1.179 +	//{{AFX_VIRTUAL(AddGBCode)
   1.180 +protected:
   1.181 +	virtual void DoDataExchange(CDataExchange*pDX);   // DDX/DDV support
   1.182 +	//}}AFX_VIRTUAL
   1.183 +
   1.184 +	// Implementation
   1.185 +protected:
   1.186 +	int     addLength;
   1.187 +	CString addTitle;
   1.188 +	bool    (*addVerify)(const char *, const char *);
   1.189 +
   1.190 +	// Generated message map functions
   1.191 +	//{{AFX_MSG(AddGBCode)
   1.192 +	afx_msg void OnOk();
   1.193 +	afx_msg void OnCancel();
   1.194 +	virtual BOOL OnInitDialog();
   1.195 +	//}}AFX_MSG
   1.196 +	DECLARE_MESSAGE_MAP()
   1.197 +};
   1.198 +//{{AFX_INSERT_LOCATION}}
   1.199 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
   1.200 +
   1.201 +#endif // !defined(AFX_GBCHEATSDLG_H__8ECCB04A_AB75_4552_8625_C6FBF30A95D9__INCLUDED_)