2017-08-30 22:31:27 +00:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "ScriptingContext.h"
|
|
|
|
|
|
|
|
struct lua_State;
|
|
|
|
class Debugger;
|
|
|
|
|
|
|
|
class LuaScriptingContext : public ScriptingContext
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
lua_State* _lua = nullptr;
|
|
|
|
|
2017-10-05 23:44:37 +00:00
|
|
|
protected:
|
2017-11-21 00:15:17 +00:00
|
|
|
void InternalCallMemoryCallback(uint16_t addr, uint8_t &value, CallbackType type) override;
|
|
|
|
int InternalCallEventCallback(EventType type) override;
|
2017-10-05 23:44:37 +00:00
|
|
|
|
2017-08-30 22:31:27 +00:00
|
|
|
public:
|
|
|
|
LuaScriptingContext();
|
|
|
|
~LuaScriptingContext();
|
|
|
|
|
2017-11-21 00:15:17 +00:00
|
|
|
bool LoadScript(string scriptName, string scriptContent, Debugger* debugger) override;
|
2017-10-07 23:48:45 +00:00
|
|
|
|
|
|
|
void UnregisterMemoryCallback(CallbackType type, int startAddr, int endAddr, int reference) override;
|
|
|
|
void UnregisterEventCallback(EventType type, int reference) override;
|
2017-08-30 22:31:27 +00:00
|
|
|
};
|