Hey Guys!

This is a part of my current project i'm working on. I#m writing some sort of conversation system which is programmable with a simple language (like basic).
This conversation system will also be able to call any lite-c function you have with the correct parameters.
This is the point where my plugin comes in:
It is a wrapper for the c-library dyncall (www.dyncall.org)
It allows you to call lite-c functions with a dynamic parameter list, so you only need the function pointer and some variables to push to the argument list.

Here is some example code:
Code:
#include <acknex.h>
#include <default.c>
#include "dyncall.h"

DyncallVM *vm;

int intRetval(char* txt)
{
	int i = str_to_int(txt);
	return i;
}

int main(void)
{
	vm = Dyncall_CreateVM(4096);
	Dyncall_Mode(vm, DC_CALL_C_DEFAULT);
	
	// Test of int/char*
	Dyncall_Reset(vm);
	Dyncall_ArgPointer(vm, "42");
	int rInt= Dyncall_CallInt(vm, intRetval);
	error(str_for_int(NULL, rInt));
	
	
	Dyncall_FreeVM(vm);
	
}



I've added support for var with some easy tricks.

Download the wrapper with demo and manual here:
http://www.target-of-victory.com/Download/DyncallWrapper.zip

Have fun!
Felix


Visit my site: www.masterq32.de