2013-04-17 22:43:11 -04:00
|
|
|
// Copyright 2013 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.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2015-05-08 17:28:03 -04:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class IniFile;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2008-12-17 04:14:24 +00:00
|
|
|
namespace ActionReplay
|
|
|
|
{
|
|
|
|
|
2010-04-08 16:59:35 +00:00
|
|
|
struct AREntry
|
|
|
|
{
|
2009-02-20 00:07:35 +00:00
|
|
|
AREntry() {}
|
|
|
|
AREntry(u32 _addr, u32 _value) : cmd_addr(_addr), value(_value) {}
|
2008-12-08 04:46:09 +00:00
|
|
|
u32 cmd_addr;
|
|
|
|
u32 value;
|
|
|
|
};
|
|
|
|
|
2010-04-08 16:59:35 +00:00
|
|
|
struct ARCode
|
|
|
|
{
|
2008-12-08 04:46:09 +00:00
|
|
|
std::string name;
|
|
|
|
std::vector<AREntry> ops;
|
|
|
|
bool active;
|
2013-09-07 23:02:49 +02:00
|
|
|
bool user_defined;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|
|
|
|
|
2008-12-17 04:14:24 +00:00
|
|
|
void RunAllActive();
|
|
|
|
bool RunCode(const ARCode &arcode);
|
2014-02-15 01:12:13 -05:00
|
|
|
void LoadCodes(const IniFile &globalini, const IniFile &localIni, bool forceLoad);
|
2013-09-23 02:39:14 -04:00
|
|
|
void LoadCodes(std::vector<ARCode> &_arCodes, IniFile &globalini, IniFile &localIni);
|
2008-12-17 04:14:24 +00:00
|
|
|
size_t GetCodeListSize();
|
|
|
|
ARCode GetARCode(size_t index);
|
|
|
|
void SetARCode_IsActive(bool active, size_t index);
|
|
|
|
void UpdateActiveList();
|
|
|
|
void EnableSelfLogging(bool enable);
|
|
|
|
const std::vector<std::string> &GetSelfLog();
|
|
|
|
bool IsSelfLogging();
|
2015-03-06 12:26:40 +01:00
|
|
|
std::vector<ARCode>* GetARCodes();
|
2008-12-17 04:14:24 +00:00
|
|
|
} // namespace
|