Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


tricky scripting question

This topic is 6253 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!