76 lines
1.2 KiB
C++
76 lines
1.2 KiB
C++
#pragma once
|
|
#include <kiwano/kiwano.h>
|
|
using namespace kiwano;
|
|
#include <kiwano-audio/kiwano-audio.h>
|
|
using namespace kiwano::audio;
|
|
|
|
|
|
#include "squirrel.h"
|
|
#include "sqstdaux.h"
|
|
#include "sqstdblob.h"
|
|
#include "sqstdio.h"
|
|
#include "sqstdmath.h"
|
|
#include "sqstdstring.h"
|
|
#include "sqstdsystem.h"
|
|
|
|
#include <iostream>
|
|
#include <map>
|
|
#include <unordered_map>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <sstream>
|
|
#include <thread>
|
|
#include <tchar.h>
|
|
#include <fstream>
|
|
#include <sstream>
|
|
|
|
|
|
#ifdef SQUNICODE
|
|
#define scfprintf fwprintf
|
|
#define scfopen _wfopen
|
|
#define scvprintf vwprintf
|
|
#define _SST(a) (SQChar*)##a
|
|
#else
|
|
#define scfprintf fprintf
|
|
#define scfopen fopen
|
|
#define scvprintf vprintf
|
|
#endif
|
|
|
|
|
|
class SquirrelClassEx
|
|
{
|
|
|
|
public://输出拓展
|
|
|
|
|
|
public://API类
|
|
//重载Nut脚本
|
|
static SQInteger ReloadingScript();
|
|
//退出游戏
|
|
static SQInteger Exit(HSQUIRRELVM v);
|
|
|
|
public: //纹理类
|
|
|
|
public://类扩展
|
|
|
|
|
|
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();
|
|
};
|
|
|
|
static HSQUIRRELVM v; |