Re: ASM Addresses [message #246179 is a reply to message #246163] |
Wed, 21 February 2007 03:14   |
0x90
Messages: 142 Registered: September 2006 Location: Germany
Karma:
|
Recruit |
|
|
but that are just the exported functions of a dll (in this case the bhs.dll i guess?!)
this is useless if youre looking for engine pointers in a closed-source "exe" file like you will find them in jonwils scripts.dll source. dont have the sources here right now but i think it was InitEngine()@Engine.c
oh and btw, just to do some smalltalk, instead of using typedefs for all those funcptr calls i wrote myself a small function:
pCall(ptraddress,argcount,arguments...)
for example: if there was a function in the renegade engine to set some players money at 0x12345678 and it needs two arguments (playerid and moneyamount) you would call it that way:
pCall(0x12345678,2,playerid,moneyamount);
of course a typedef is more failsafe/nicer but if you have to call many funcptr's randomly, this is a quick'n'dirty, asm-based solution to do it. the contra: it has of course some (code)overhead.
regards
0x90
|
|
|