ISOProperties.cpp can now toggle and remove cheats/patches. Still have to do add/edit. Put PatchEngine in it's own namespace, changed format of patches.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1289 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman committed 2008-11-24 19:11:15 +00:00
1 parent 4dd91ec191
commit 0b5fed62c1
20 files changed
+308 -169

No files matched your search

+21 -8
View File
@@ -18,6 +18,11 @@
#ifndef _PATCHENGINE_H
#define _PATCHENGINE_H
#include "IniFile.h"
namespace PatchEngine
{
enum PatchType
{
PATCH_8BIT,
@@ -33,19 +38,27 @@ static const char *PatchTypeStrings[] =
0
};
struct Patch
struct PatchEntry
{
Patch() {}
Patch(PatchType _t, u32 _addr, u32 _value) : type(_t), address(_addr), value(_value) {}
PatchEntry() {}
PatchEntry(PatchType _t, u32 _addr, u32 _value) : type(_t), address(_addr), value(_value) {}
PatchType type;
u32 address;
u32 value;
};
void PatchEngine_LoadPatches(const char *gameID);
void PatchEngine_ApplyLoadPatches();
void PatchEngine_ApplyFramePatches();
void PatchEngine_ApplyARPatches();
int PatchEngine_GetSpeedhackCycles(u32 addr);
struct Patch
{
std::string name;
std::vector<PatchEntry> entries;
bool active;
};
int GetSpeedhackCycles(u32 addr);
void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile &ini);
void LoadPatches(const char *gameID);
void ApplyFramePatches();
void ApplyARPatches();
} // namespace
#endif //_PATCHENGINE_H