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://<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ
 | |||
|  | 
 | |||
|  | 
 | |||
|  | public://API<50><49>
 | |||
|  | 	//<2F><><EFBFBD><EFBFBD>Nut<75>ű<EFBFBD>
 | |||
|  | 	static SQInteger ReloadingScript(); | |||
|  | 	//<2F>˳<EFBFBD><CBB3><EFBFBD>Ϸ
 | |||
|  | 	static SQInteger Exit(HSQUIRRELVM v); | |||
|  | 
 | |||
|  | public:	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  | 
 | |||
|  | public://<2F><><EFBFBD><EFBFBD>չ
 | |||
|  | 
 | |||
|  | 
 | |||
|  | public://ע<><D7A2><EFBFBD>հ<EFBFBD><D5B0><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  | 	//<2F><><EFBFBD><EFBFBD>nut<75>ӿ<EFBFBD>funcName<6D><65><EFBFBD><EFBFBD>C<EFBFBD><43><EFBFBD>Ժ<EFBFBD><D4BA><EFBFBD>funcAddr
 | |||
|  | 	static void RegisterNutApi(const SQChar* funcName, void* funcAddr, HSQUIRRELVM v); | |||
|  | 	//ע<><D7A2><EFBFBD>ӿ<EFBFBD>
 | |||
|  | 	void R_Register_Nut(HSQUIRRELVM v); | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | public: | |||
|  | 	SquirrelClassEx(); | |||
|  | 	//<2F><>ʼ<EFBFBD><CABC>
 | |||
|  | 	void Init(); | |||
|  | 	//<2F><><EFBFBD><EFBFBD>
 | |||
|  | 	void Run(); | |||
|  | 	//<2F>ر<EFBFBD>
 | |||
|  | 	void Close(); | |||
|  | }; | |||
|  | 
 | |||
|  | static HSQUIRRELVM v; |