-
Notifications
You must be signed in to change notification settings - Fork 17
/
MainFrame.h
210 lines (168 loc) · 5.21 KB
/
MainFrame.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
//
// メインウインドウクラス
//
#ifndef __CMAINFRAME_INCLUDED__
#define __CMAINFRAME_INCLUDED__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string>
using namespace std;
#include "Wnd.h"
#include "EmuThread.h"
#include "LauncherDlg.h"
#include "CheatDlg.h"
#include "PatternView.h"
#include "NameTableView.h"
#include "PaletteView.h"
#include "MemoryView.h"
#include "DatachBarcodeDlg.h"
#include "ChatDlg.h"
#include "PaletteEdit.h"
#include "DipSwitchDlg.h"
#include "AviConvDlg.h"
class CMainFrame : public CWnd
{
public:
// Override from CWnd
BOOL Create( HWND hWndParent );
void Destroy();
// Override from CWnd
BOOL PreTranslateMessage( MSG* pMsg );
static void OnKeyControl();
protected:
void OnEmulationStart( LPCSTR szFile, BOOL bChecked );
void OnFullScreenGDI( BOOL bFlag );
void OnShowCursor( BOOL bFlag );
void OnChangeMenu( BOOL bFlag );
void OnSetWindowSize();
void OnRebuildMenu();
void OnUpdateMenu( HMENU hMenu, UINT uID );
static void _cdecl KeyThreadProc( LPVOID lpParam );
// Message map
WND_MESSAGE_MAP()
WNDMSG OnCreate( WNDMSGPARAM );
WNDMSG OnClose( WNDMSGPARAM );
WNDMSG OnDestroy( WNDMSGPARAM );
WNDMSG OnActivate( WNDMSGPARAM );
WNDMSG OnActivateApp( WNDMSGPARAM );
WNDMSG OnShortCutEnable( WNDMSGPARAM ); // Private message
WNDMSG OnEnable( WNDMSGPARAM );
WNDMSG OnEnterMenuLoop( WNDMSGPARAM );
WNDMSG OnExitMenuLoop( WNDMSGPARAM );
WNDMSG OnSetFocus( WNDMSGPARAM );
WNDMSG OnKillFocus( WNDMSGPARAM );
WNDMSG OnInitMenu( WNDMSGPARAM );
WNDMSG OnInitMenuPopup( WNDMSGPARAM );
WNDMSG OnGetMinMaxInfo( WNDMSGPARAM );
WNDMSG OnPaint( WNDMSGPARAM );
WNDMSG OnDisplayChange( WNDMSGPARAM );
WNDMSG OnPaletteChanged( WNDMSGPARAM );
WNDMSG OnQueryNewPalette( WNDMSGPARAM );
WNDMSG OnMenuChar( WNDMSGPARAM );
WNDMSG OnKeyDown( WNDMSGPARAM );
WNDMSG OnSize( WNDMSGPARAM );
WNDMSG OnSysCommand( WNDMSGPARAM );
WNDMSG OnExitSizeMove( WNDMSGPARAM );
WNDMSG OnSetCursor( WNDMSGPARAM );
WNDMSG OnTimer( WNDMSGPARAM );
WNDMSG OnCopyData( WNDMSGPARAM );
WNDMSG OnErrorMessage( WNDMSGPARAM ); // Private message
WNDMSG OnDropFiles( WNDMSGPARAM );
WNDMSG OnCommandLine( WNDMSGPARAM ); // Private message
WNDMSG OnLauncherCommand( WNDMSGPARAM ); // Private message
WNDMSG OnNetPlay( WNDMSGPARAM );
WNDMSG OnNetPlayClose( WNDMSGPARAM );
WNDMSG OnNetPlayError( WNDMSGPARAM );
WNDMSG OnNetPlayChatPopup( WNDMSGPARAM );
WNDCMD OnExit( WNDCMDPARAM );
WNDCMD OnHelp( WNDCMDPARAM );
WNDCMD OnAbout( WNDCMDPARAM );
WNDCMD OnFileOpen( WNDCMDPARAM );
WNDCMD OnFileClose( WNDCMDPARAM );
WNDCMD OnRecentOpen( WNDCMDPARAM );
WNDCMD OnRecentOpenPath( WNDCMDPARAM );
WNDCMD OnRomInfo( WNDCMDPARAM );
WNDCMD OnWaveRecord( WNDCMDPARAM );
WNDCMD OnLauncher( WNDCMDPARAM );
WNDCMD OnSearch( WNDCMDPARAM );
WNDCMD OnCheat( WNDCMDPARAM );
WNDCMD OnGenie( WNDCMDPARAM );
WNDCMD OnCheatCommand( WNDCMDPARAM );
WNDCMD OnDatachBacode( WNDCMDPARAM );
WNDCMD OnDipSwitch( WNDCMDPARAM );
WNDCMD OnNetPlayConnect( WNDCMDPARAM );
WNDCMD OnNetPlayDisconnect( WNDCMDPARAM );
WNDCMD OnNetPlayChat( WNDCMDPARAM );
WNDCMD OnEmulatorCfg( WNDCMDPARAM );
WNDCMD OnGraphicsCfg( WNDCMDPARAM );
WNDCMD OnSoundCfg( WNDCMDPARAM );
WNDCMD OnControllerCfg( WNDCMDPARAM );
WNDCMD OnShortcutCfg( WNDCMDPARAM );
WNDCMD OnFolderCfg( WNDCMDPARAM );
WNDCMD OnLanguageCfg( WNDCMDPARAM );
WNDCMD OnMovieCfg( WNDCMDPARAM );
WNDCMD OnGameOptionCfg( WNDCMDPARAM );
WNDCMD OnJoyAxisCfg( WNDCMDPARAM );
WNDCMD OnPaletteEditCfg( WNDCMDPARAM );
WNDCMD OnFullScreen( WNDCMDPARAM );
WNDCMD OnZoom( WNDCMDPARAM );
WNDCMD OnViewCommand( WNDCMDPARAM );
WNDCMD OnEmuCommand( WNDCMDPARAM );
WNDCMD OnStateCommand( WNDCMDPARAM );
WNDCMD OnStateCommand2( WNDCMDPARAM ); // For QuickLoad/Save
WNDCMD OnMovieCommand( WNDCMDPARAM );
WNDCMD OnMovieInfo( WNDCMDPARAM );
WNDCMD OnMovieConv( WNDCMDPARAM );
WNDCMD OnTapeCommand( WNDCMDPARAM );
// Command line
CHAR m_szCommandLine[_MAX_PATH];
// Window activate flags
BOOL m_bActivate;
BOOL m_bActivateApp;
BOOL m_bForcus;
BOOL m_bEnable;
static BOOL m_bKeyEnable;
// Cursor
BOOL m_bCursor;
UINT m_uTimerID;
DWORD m_LastMovedTime;
// Menu flags
BOOL m_bMenu;
// Window Position
BOOL m_bZoomed;
RECT m_WindowRect;
WINDOWPLACEMENT m_WindowPlacement;
// Window Style
LONG m_ExStyleBackup;
LONG m_StyleBackup;
// Short Cut
UINT m_uKeyTimerID;
volatile BOOL m_bKeyChecking;
static DWORD m_dwKeyTime;
static BYTE m_KeyBuf[256+64*8];
static BYTE m_KeyOld[256+64*8];
static BYTE m_KeyCnt[256*64*8];
static volatile BOOL m_bKeyThreadExit;
// Emulator
NES* Nes;
// CEmuThread Emu;
// State slot
INT m_nStateSlot;
// Launcher
CLauncherDlg m_LauncherDlg;
// Cheat
CSearchDlg m_SearchDlg;
// Viewer
CPatternView m_PatternView;
CNameTableView m_NameTableView;
CPaletteView m_PaletteView;
CMemoryView m_MemoryView;
// Palette Editor
CPaletteEdit m_PaletteEdit;
// Cheat
CDatachBarcodeDlg m_DatachBarcodeDlg;
// Chat
CChatDlg m_ChatDlg;
private:
};
#endif // !__CMAINFRAME_INCLUDED__