18.01.2008, 11:31:34
I thought of something that might make things simpler concerning how to get code called by the game.
The initial idea was to release a list of code addresses and descriptions of those.
The problem is, the data you want to work with will lie in certain registers or somewhere in the stack frame and it would require you to use assembly in order to access them.
That's something I believe should be simplified, and what I thought of are callback functions.
Once the game reaches a specific code address, that would raise an event which gets all the necessary data from the registers/stack and passes it to your callback function as arguments.
These callback functions you would have to define at the game start (which is no problem).
You'd still have to edit the INI with code addresses, because you should remove all the "events" you don't use (they'd still be raised and the DLL would be called... to no avail -> possible slowdown with multiple DLLs).
So, the advantage of this is sane names instead of code addresses, and C variables instead of registers and stack frames.
Any ideas to improve this idea?
The initial idea was to release a list of code addresses and descriptions of those.
The problem is, the data you want to work with will lie in certain registers or somewhere in the stack frame and it would require you to use assembly in order to access them.
That's something I believe should be simplified, and what I thought of are callback functions.
Once the game reaches a specific code address, that would raise an event which gets all the necessary data from the registers/stack and passes it to your callback function as arguments.
These callback functions you would have to define at the game start (which is no problem).
You'd still have to edit the INI with code addresses, because you should remove all the "events" you don't use (they'd still be raised and the DLL would be called... to no avail -> possible slowdown with multiple DLLs).
So, the advantage of this is sane names instead of code addresses, and C variables instead of registers and stack frames.
Any ideas to improve this idea?