From 083228a10dffcaa77b1d0035c29013c6802befd4 Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Sun, 8 Jul 2012 21:01:08 +0000 Subject: Squirrel Plugins I worked a little bit on the squirrel Bindings They work now on linux and windows :) (OSX is untested, but should work also) but they are very limited at the moment. (Only made OnChat working) I also fixed some small bugs. git-svn-id: http://mc-server.googlecode.com/svn/trunk@648 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- .../sqplus/SquirrelBindingsUtilsWin32.cpp | 31 ---------------------- 1 file changed, 31 deletions(-) delete mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.cpp (limited to 'squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.cpp') diff --git a/squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.cpp b/squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.cpp deleted file mode 100644 index dd3f850ca..000000000 --- a/squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "sqplus.h" - -//#include "SquirrelObject.h" -//#include "SquirrelVM.h" -#include "SquirrelBindingsUtilsWin32.h" - -int refcounted_release_hook(SQUserPointer p, int size) -{ - IUnknown *pRC = (IUnknown*)p; - pRC->Release(); - return 0; -} - -static BOOL __CreateRefCountedInstance(HSQUIRRELVM v,const SQChar *classname,IUnknown *pRC,SQRELEASEHOOK hook) -{ - if(!CreateNativeClassInstance(v,classname,pRC,hook)) return FALSE; - return TRUE; -} - -int construct_RefCounted(IUnknown *p) -{ - sq_setinstanceup(SquirrelVM::GetVMPtr(),1,p); - sq_setreleasehook(SquirrelVM::GetVMPtr(),1,refcounted_release_hook); - return 1; -} - - -BOOL CreateRefCountedInstance(HSQUIRRELVM v,const SQChar *classname,IUnknown *pRC) -{ - return __CreateRefCountedInstance(v,classname,pRC,refcounted_release_hook); -} -- cgit v1.2.3