Couple questions regarding the plugin interface. It gives instructions for overriding the built-in functions, but can this be used to override the member functions of AGS classes? They would have to be declared, I assume, like:
Code: ags
But would that actually work?
If so, how would we declare the objects passed as the first parameter? Are the AGSCharacter and AGSObject classes the right ones for those cases, or are they different? What about the other objects that are not exposed in the plugin header?
I'm working on a plugin that would require the (very careful) replacement of some very basic functions. If I have to, I'll make do with separate functions and just tell the user to use mine instead of the regular ones, but it would make things much easier for other folks using it if I could just ... alter the original functions themselves. Very carefully.
HoN
int MyChar_AddInventory(AGSCharacter *cha, InventoryItem *item, int addAtIndex);
RegisterScriptFunction("Character::AddInventory^2", MyChar_AddInventory);
But would that actually work?
If so, how would we declare the objects passed as the first parameter? Are the AGSCharacter and AGSObject classes the right ones for those cases, or are they different? What about the other objects that are not exposed in the plugin header?
I'm working on a plugin that would require the (very careful) replacement of some very basic functions. If I have to, I'll make do with separate functions and just tell the user to use mine instead of the regular ones, but it would make things much easier for other folks using it if I could just ... alter the original functions themselves. Very carefully.
HoN