-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCheatDlg.h
175 lines (135 loc) · 3.36 KB
/
CheatDlg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
//
// チートダイアログクラス
//
#ifndef __CCHEATDLG_INCLUDED__
#define __CCHEATDLG_INCLUDED__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <list>
#include <vector>
#include <string>
using namespace std;
#include "Wnd.h"
#include "cheat.h"
// サーチダイアログ
class CSearchDlg : public CWnd
{
public:
// Override from CWnd
BOOL Create( HWND hWndParent );
void Destroy();
protected:
void OnListUpdate();
// Utils
DWORD GetNesMemory( INT length, DWORD addr );
DWORD GetSearchMemory( INT length, DWORD addr );
DWORD GetSearchMemoryOld( INT length, DWORD addr );
BOOL CompareData( INT type, DWORD dataA, DWORD dataB );
BOOL CompareRange( INT length, DWORD dataA, DWORD dataB, DWORD range );
// Message map
DLG_MESSAGE_MAP()
DLGMSG OnInitDialog( DLGMSGPARAM );
DLGMSG OnActivate( DLGMSGPARAM );
DLGMSG OnClose( DLGMSGPARAM );
DLGMSG OnContextMenu( DLGMSGPARAM );
DLGCMD OnOK( DLGCMDPARAM );
DLGCMD OnCancel( DLGCMDPARAM );
DLGCMD OnRadixCommand( DLGCMDPARAM );
DLGCMD OnLengthCommand( DLGCMDPARAM );
DLGCMD OnStart( DLGCMDPARAM );
DLGCMD OnUpdate( DLGCMDPARAM );
DLGCMD OnUndo( DLGCMDPARAM );
DLGCMD OnSearchCommand( DLGCMDPARAM );
DLGCMD OnSearchData( DLGCMDPARAM );
DLGCMD OnWriteData( DLGCMDPARAM );
DLGCMD OnCodeAppend( DLGCMDPARAM );
//
DLGNOTIFY OnDoubleClickListView( DLGNOTIFYPARAM );
private:
HMENU m_hMenu;
HMENU m_hSubMenu;
BOOL m_bShortCutDisable;
WORD m_Address;
INT m_nRadix;
INT m_nLength;
struct RESULT {
BYTE RAM_N[0x0800]; // RAM New value
BYTE RAM_O[0x0800]; // RAM Old value
BYTE RAM_F[0x0800]; // RAM Flag
BYTE SRAM_N[0x2000]; // RAM New value
BYTE SRAM_O[0x2000]; // RAM Old value
BYTE SRAM_F[0x2000]; // RAM Flag
};
struct RESULT m_Result; // 今回データ
struct RESULT m_ResultOld; // 1回前
};
// チートコード編集ダイアログ
class CCheatCodeEditDlg : public CWnd
{
public:
// Override from CWnd
INT DoModal( HWND hWndParent );
//
CHEATCODE m_Code;
INT m_nRadix;
protected:
// Message map
DLG_MESSAGE_MAP()
DLGMSG OnInitDialog( DLGMSGPARAM );
DLGCMD OnOK( DLGCMDPARAM );
DLGCMD OnCancel( DLGCMDPARAM );
//
private:
};
// チートコード入力ダイアログ
class CCheatCodeInputDlg : public CWnd
{
public:
// Override from CWnd
INT DoModal( HWND hWndParent );
string m_Codes;
string m_Comment;
protected:
// Message map
DLG_MESSAGE_MAP()
DLGMSG OnInitDialog( DLGMSGPARAM );
DLGCMD OnOK( DLGCMDPARAM );
DLGCMD OnCancel( DLGCMDPARAM );
//
private:
};
// チートコードダイアログ
class CCheatCodeDlg : public CWnd
{
public:
// Override from CWnd
INT DoModal( HWND hWndParent );
protected:
void OnListUpdate();
// Message map
DLG_MESSAGE_MAP()
DLGMSG OnInitDialog( DLGMSGPARAM );
DLGMSG OnDestroy( DLGMSGPARAM );
DLGMSG OnTimer( DLGMSGPARAM );
DLGNOTIFY OnKeyDownListView( DLGNOTIFYPARAM );
DLGNOTIFY OnClickListView( DLGNOTIFYPARAM );
DLGNOTIFY OnDblClkListView( DLGNOTIFYPARAM );
DLGCMD OnOK( DLGCMDPARAM );
DLGCMD OnCancel( DLGCMDPARAM );
DLGCMD OnEnable( DLGCMDPARAM );
DLGCMD OnDisable( DLGCMDPARAM );
DLGCMD OnClear( DLGCMDPARAM );
DLGCMD OnRemove( DLGCMDPARAM );
DLGCMD OnInput( DLGCMDPARAM );
DLGCMD OnEdit( DLGCMDPARAM );
DLGCMD OnLoad( DLGCMDPARAM );
DLGCMD OnSave( DLGCMDPARAM );
// Image List
HIMAGELIST m_hImageList;
// Timer
UINT m_uTimerID;
// Temp buffer
vector<CHEATCODE> m_CheatCode;
private:
};
#endif // !__CCHEATDLG_INCLUDED__