Hello,
Currently, whenever a "type" (Such as vector3, player, etc) is declared to the GM VM, I take the type integer that's returned, and feed into a hashmap that returns my type information in the engine. This is also then "executed" in the VM as "global typename = typeid;".
I then create a function called "new", which takes this typeid. When it is called, it creates and returns an object, based upon the lookup of that typeid.
I was wondering if anyone has actually created new and delete operators, so instead of this:
pl = new(Player);
I could do
pl = new Player;
Thanks in advance!
|