Mesen-S/Core/ScriptManager.h
Sour d204485153 Added Super Game Boy support
Missing support for SGB2's timings and still needs a few tweaks and more testing
2020-06-18 00:58:39 -04:00

29 lines
740 B
C++

#pragma once
#include "stdafx.h"
#include "../Utilities/SimpleLock.h"
#include "EventType.h"
#include "DebugTypes.h"
class Debugger;
class ScriptHost;
enum class MemoryOperationType;
class ScriptManager
{
private:
Debugger *_debugger;
bool _hasScript;
SimpleLock _scriptLock;
int _nextScriptId;
vector<shared_ptr<ScriptHost>> _scripts;
public:
ScriptManager(Debugger *debugger);
__forceinline bool HasScript() { return _hasScript; }
int32_t LoadScript(string name, string content, int32_t scriptId);
void RemoveScript(int32_t scriptId);
const char* GetScriptLog(int32_t scriptId);
void ProcessEvent(EventType type);
void ProcessMemoryOperation(uint32_t address, uint8_t &value, MemoryOperationType type, CpuType cpuType);
};