I''m writing my own general game Editor. It supports overriding of virtual methods with scripts. But these virtual methods must be allowed to be called from the c++ side. I can make a general binding function like described in the FuBi article which pops the ecx registers and values from the stack, and pushes them onto the scripting engine stack. The problem is that this function has no way of knowing which script function to call. I don''t want the c++ coder to have to push the script function name or anything. I was considering writing a custom compiler for the scripting functions. This compiler would copy the assembly from the normal function binding method and insert the pointer to the correct script function to call. Is this feasible, am I crazy? struct object void* vtable object.vtable[FunctionIndex] = script_binding_function; then what?
tricky scripting question
No replies to this topic