46 lines
652 B
C++
46 lines
652 B
C++
#pragma once
|
|
|
|
|
|
#include "squirrel.h"
|
|
#include "sqstdaux.h"
|
|
#include "sqstdblob.h"
|
|
#include "sqstdio.h"
|
|
#include "sqstdmath.h"
|
|
#include "sqstdstring.h"
|
|
#include "sqstdsystem.h"
|
|
|
|
|
|
|
|
class SquirrelClassEx
|
|
{
|
|
|
|
public://输出拓展
|
|
|
|
|
|
public://API类
|
|
//重载Nut脚本
|
|
static SQInteger ReloadingScript();
|
|
//退出游戏
|
|
static SQInteger Exit(HSQUIRRELVM v);
|
|
|
|
public://注册闭包函数
|
|
//新增nut接口funcName绑定C语言函数funcAddr
|
|
static void RegisterNutApi(const SQChar* funcName, void* funcAddr, HSQUIRRELVM v);
|
|
//注册接口
|
|
void R_Register_Nut(HSQUIRRELVM v);
|
|
|
|
|
|
|
|
|
|
public:
|
|
SquirrelClassEx() {
|
|
|
|
}
|
|
//初始化
|
|
void Init();
|
|
//运行
|
|
void Run();
|
|
//关闭
|
|
void Close();
|
|
};
|