Well for MindScript we create a function in a special header file that the interpreter calls called builtin.h. Inside of builtin.h we create our internal functions like say we want to add a function called LoadAMesh( meshname , x , y...etc. We create a new object called LoadAMesh and create the parameters that it will take. Then we write what is to happen when LoadAMesh is read in a script file. In this case we would have it take the variables you pass through it and then proceed to load a mesh at the designated x y an z.
Mindgamez Entertainment
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Lua embedding
So if I understand correctly you would the VM would get an opcode for a function call, followed by the function "index". The index would lookup into a table to figure out the number of params and such like and the function to call?
Thanks.
Thanks.
Thanks.
That makes things clearer for when I finally get around to finnishing my VM!
btw you must be up late over there in the USA
That makes things clearer for when I finally get around to finnishing my VM!
btw you must be up late over there in the USA
Glad I could be of some help, and yes, its 2:30 AM here lol I need to go to bed...
Mindgamez Entertainment
Mindgamez Entertainment
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement