AxibugEmuOnline/virtuanessrc097-master/NES/Cheat.h

45 lines
1.5 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __CEHAT_INCLUDED__
#define __CEHAT_INCLUDED__
#include "typedef.h"
#include <string>
using namespace std;
// 以下のつはORマスク
#define CHEAT_ENABLE (1<<0)
#define CHEAT_KEYDISABLE (1<<1)
// 書き込み種類
#define CHEAT_TYPE_ALWAYS 0 // 常に書き込み
#define CHEAT_TYPE_ONCE 1 // 1回だけ書き込み
#define CHEAT_TYPE_GREATER 2 // データより大きい時
#define CHEAT_TYPE_LESS 3 // データより小さい時
// データ長
#define CHEAT_LENGTH_1BYTE 0
#define CHEAT_LENGTH_2BYTE 1
#define CHEAT_LENGTH_3BYTE 2
#define CHEAT_LENGTH_4BYTE 3
class CHEATCODE {
public:
BYTE enable;
BYTE type;
BYTE length;
WORD address;
DWORD data;
string comment;
};
class GENIECODE {
public:
WORD address;
BYTE data;
BYTE cmp;
};
#endif // !__CEHAT_INCLUDED__