Add CheatEngine and support for Gateway cheats (#4406)
* Add CheatEngine; Add support for Gateway cheats; Add Cheat UI * fix a potential crash on some systems * fix substr with negative length * Add Joker to the NonOp comp handling * Fixup JokerOp * minor fixup in patchop; add todo for nested loops * Add comment for PadState member variable in HID * fix: stol to stoul in parsing cheat file * fix misplaced parsing of values; fix patchop code * add missing break * Make read_func and write_func a template parameter
This commit is contained in:
37
src/core/cheats/cheats.h
Normal file
37
src/core/cheats/cheats.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright 2018 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
struct TimingEventType;
|
||||
} // namespace Core
|
||||
|
||||
namespace CoreTiming {
|
||||
struct EventType;
|
||||
}
|
||||
|
||||
namespace Cheats {
|
||||
|
||||
class CheatBase;
|
||||
|
||||
class CheatEngine {
|
||||
public:
|
||||
explicit CheatEngine(Core::System& system);
|
||||
~CheatEngine();
|
||||
const std::vector<std::unique_ptr<CheatBase>>& GetCheats() const;
|
||||
|
||||
private:
|
||||
void LoadCheatFile();
|
||||
void RunCallback(u64 userdata, int cycles_late);
|
||||
std::vector<std::unique_ptr<CheatBase>> cheats_list;
|
||||
Core::TimingEventType* event;
|
||||
Core::System& system;
|
||||
};
|
||||
} // namespace Cheats
|
||||
Reference in New Issue
Block a user