[Project64] Clean up ScriptHook.h
This commit is contained in:
parent
d98eab7dcc
commit
b645ef908f
|
@ -8,32 +8,32 @@ class CScriptSystem;
|
||||||
class CScriptHook
|
class CScriptHook
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef struct {
|
typedef struct {
|
||||||
CScriptInstance* scriptInstance;
|
CScriptInstance* scriptInstance;
|
||||||
void* heapptr;
|
void* heapptr;
|
||||||
uint32_t param;
|
uint32_t param;
|
||||||
uint32_t param2;
|
uint32_t param2;
|
||||||
int callbackId;
|
int callbackId;
|
||||||
bool bOnce;
|
bool bOnce;
|
||||||
} JSCALLBACK;
|
} JSCALLBACK;
|
||||||
|
|
||||||
CScriptSystem* m_ScriptSystem;
|
CScriptSystem* m_ScriptSystem;
|
||||||
|
|
||||||
//int m_NextCallbackId;
|
//int m_NextCallbackId;
|
||||||
vector<JSCALLBACK> m_Callbacks;
|
vector<JSCALLBACK> m_Callbacks;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CScriptHook(CScriptSystem* scriptSystem);
|
CScriptHook(CScriptSystem* scriptSystem);
|
||||||
~CScriptHook();
|
~CScriptHook();
|
||||||
int Add(CScriptInstance* scriptInstance, void* heapptr, uint32_t param = 0, uint32_t param2 = 0, bool bOnce = false);
|
int Add(CScriptInstance* scriptInstance, void* heapptr, uint32_t param = 0, uint32_t param2 = 0, bool bOnce = false);
|
||||||
void InvokeAll();
|
void InvokeAll();
|
||||||
void InvokeById(int callbackId);
|
void InvokeById(int callbackId);
|
||||||
void InvokeByParam(uint32_t param);
|
void InvokeByParam(uint32_t param);
|
||||||
/* invoke if param >= cb.param && param < cb.param2*/
|
/* invoke if param >= cb.param && param < cb.param2*/
|
||||||
void InvokeByParamInRange(uint32_t param);
|
void InvokeByParamInRange(uint32_t param);
|
||||||
void RemoveById(int callbackId);
|
void RemoveById(int callbackId);
|
||||||
void RemoveByParam(uint32_t tag);
|
void RemoveByParam(uint32_t tag);
|
||||||
void RemoveByInstance(CScriptInstance* scriptInstance);
|
void RemoveByInstance(CScriptInstance* scriptInstance);
|
||||||
bool HasContext(CScriptInstance* scriptInstance);
|
bool HasContext(CScriptInstance* scriptInstance);
|
||||||
//bool HasTag(uint32_t tag);
|
//bool HasTag(uint32_t tag);
|
||||||
};
|
};
|
Loading…
Reference in New Issue