2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2010 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 22:43:11 -04:00
|
|
|
// Refer to the license.txt file included.
|
2010-07-22 01:48:48 +00:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2010-07-22 01:48:48 +00:00
|
|
|
|
2014-02-17 05:18:15 -05:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2014-09-07 20:06:58 -05:00
|
|
|
#include "Common/CommonTypes.h"
|
2010-07-22 01:48:48 +00:00
|
|
|
|
|
|
|
namespace Gecko
|
|
|
|
{
|
|
|
|
|
|
|
|
class GeckoCode
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
GeckoCode() : enabled(false) {}
|
|
|
|
|
|
|
|
struct Code
|
|
|
|
{
|
2015-07-28 22:06:42 -04:00
|
|
|
u32 address = 0;
|
|
|
|
u32 data = 0;
|
2010-07-23 05:22:12 +00:00
|
|
|
std::string original_line;
|
2010-07-22 01:48:48 +00:00
|
|
|
};
|
|
|
|
|
2014-02-04 19:19:48 -05:00
|
|
|
std::vector<Code> codes;
|
|
|
|
std::string name, creator;
|
|
|
|
std::vector<std::string> notes;
|
2010-07-22 01:48:48 +00:00
|
|
|
|
2013-09-23 02:39:14 -04:00
|
|
|
bool enabled;
|
|
|
|
bool user_defined;
|
2013-05-05 04:50:39 +02:00
|
|
|
|
2015-06-04 14:06:22 -04:00
|
|
|
bool Compare(const GeckoCode& compare) const;
|
2015-04-15 00:38:21 -04:00
|
|
|
bool Exist(u32 address, u32 data) const;
|
2010-07-22 01:48:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void SetActiveCodes(const std::vector<GeckoCode>& gcodes);
|
|
|
|
bool RunActiveCodes();
|
2011-12-31 15:18:48 +11:00
|
|
|
void RunCodeHandler();
|
2010-07-22 01:48:48 +00:00
|
|
|
|
2014-02-16 23:51:41 -05:00
|
|
|
} // namespace Gecko
|