⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cheatdlg.h

📁 著名的任天堂FC游戏机模拟器VirtuaNes 085版的源码!
💻 H
字号:
//
// 僠乕僩僟僀傾儘僌僋儔僗
//
#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;	// 侾夞慜
};

// 僠乕僩僐乕僪曇廤僟僀傾儘僌
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__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -