SRL Archive - Development

Plugins?


n3ss3s

2012-01-11 18:51:00

SCAR used to have some sort of a sample plugin (although I'm looking for a C++ one rather than Delphi), along with a list of "plugin-accessible" functions from SCAR?

Need dat for simba pls

Brandon

2012-01-11 19:04:43

From: n3ss3s
SCAR used to have some sort of a sample plugin (although I'm looking for a C++ one rather than Delphi), along with a list of "plugin-accessible" functions from SCAR?

Need dat for simba pls


I'm also looking for this.. I wrote a whole thread class in a DLL hoping to have simba load it and see if i can get multithreading :) HOPEFULLY!

meh is it this? http://villavu.com/forum/showthread.php?t=39677

n3ss3s

2012-01-11 19:07:01

Not sure if all of that applies for Simba, also need the list of "two way" functions which probably changed with the change from SCAR to Simba…

Dgby714

2012-01-11 19:10:53

http://villavu.com/forum/showthread.php?t=66021

Just for reference here is the functions Simba will use.
function GetFunctionCount: integer; stdcall;
function GetFunctionInfo (x: Integer; var ProcAddr: Pointer; var ProcDef: PChar): integer; stdcall;
function GetFunctionCallingConv(x: integer): integer; stdcall;
function GetTypeCount: integer; stdcall;
function GetTypeInfo(x: Integer; var sType, sTypeDef: string): integer; stdcall;
procedure SetPluginMemManager(MemMgr : TMemoryManager); stdcall;

Smartzkid

2012-01-12 00:54:04

No way to call Simba's functions from a plugin? (yet?)

KingKong

2012-01-12 01:14:55

From: Smartzkid
No way to call Simba's functions from a plugin? (yet?)


Call simba's function from a plugin, i don't think thats possible for any program. And don't you mean call functions from a plugin inside simba? Because thats possible.

Brandon

2012-01-12 01:19:34

From: KingKong
Call simba's function from a plugin, i don't think thats possible for any program. And don't you mean call functions from a plugin inside simba? Because thats possible.


You can call simba functions inside a plugin.. LibMML is needed though.. Unless you mean calling script functions inside the plugin which definitely doesn't work. But functions from the includes/simba's internals can be called/used/written..

KingKong

2012-01-12 01:59:06

From: ggzz
You can call simba functions inside a plugin.. LibMML is needed though.. Unless you mean calling script functions inside the plugin which definitely doesn't work. But functions from the includes/simba's internals can be called/used/written..


LibMML does not call simba's functions, it rewrites some of simba's color finding functions into a dll so that it can used by other languages. And I have no clue what you said after that. :confused:.

@OP Are you asking for a default plugin template for Simba written in C++?

Markus

2012-01-12 02:18:06

From: KingKong
LibMML does not call simba's functions, it rewrites some of simba's color finding functions into a dll so that it can used by other languages. And I have no clue what you said after that. :confused:.


Uhm not completely. You can just include the entire Simba sourcecode in your plugin, thus allowing you to call every Simba function there is (just pass on a client to the dll and DON'T FORGET TO SET THE MEMORY MANAGER.)

Dgby714

2012-01-12 02:20:51

From: Markus
Uhm not completely. You can just include the entire Simba sourcecode in your plugin, thus allowing you to call every Simba function there is (just pass on a client to the dll and DON'T FORGET TO SET THE MEMORY MANAGER.)


Not in C/++ without some serious work…

Daniel

2012-01-12 04:56:24

From: Markus
Uhm not completely. You can just include the entire Simba sourcecode in your plugin, thus allowing you to call every Simba function there is (just pass on a client to the dll and DON'T FORGET TO SET THE MEMORY MANAGER.)


SCAR used to be able to and that was closed source.. It seemed a much easier system and doesn't bloat the DLL? :S

KingKong

2012-01-12 06:01:52

From: Markus
Uhm not completely. You can just include the entire Simba sourcecode in your plugin, thus allowing you to call every Simba function there is (just pass on a client to the dll and DON'T FORGET TO SET THE MEMORY MANAGER.)


Thats making a plugin out of simba's functions, not calling them from a plugin which was what ggzz said.

Wizzup?

2012-01-12 17:34:11

What functions do you want to access? And for what purposes?

n3ss3s

2012-01-13 17:06:47

<n3ss3s> the reason I'd wanna access Simba functions (FindColorsTolerance mostly) would be a part of enabling prdy good security for payscripts
<n3ss3s> store critical values in a dll -> call dll to get an array of random ass values that are somehow tagged for which one is the actual color -> pass array to probed findcolorstol -> returns point array
<n3ss3s> = script no werk without dll n key

nielsie95

2012-01-13 17:48:28

I don't think you can actually call the FindColor instance of the script (with the proper client), but you can pass the client to the dll and do the FindColor from there. Will be a lot harder in c, though.
Functions like writeln are not possible yet.