kung foo man (31st August 2020)
There is not much code, you can describe it as your own function (translate pseudocode in C/C++)
You can analyze the function in which this section is located, it is possible to call the upper function with certain parameters, which guarantees that this piece of code is called and only it is called
Here is a translation example, simple and straightforward:
https://github.com/damage99/libcod/b...layer.cpp#L830
If you need to replace only a piece of code, but leave the main function unchanged, then the simplest options are to analyze the conditions and, if they match (this subroutine is called in the original) - replace it with a function call that you translated from pseudocode; if the conditions are different, just call the original function
*like this:
https://github.com/damage99/libcod/b...ibcod.cpp#L139
: only you need to analyze the input arguments of this function, when you understand that the required subroutine should be called, then call reworked_func(), if not, then call original_func()
Last edited by maxdamage99; 1st September 2020 at 06:09.
PHP Code:
class CoronaVirus
{
CoronaVirus(int m = 1): multi(m) { Peoples.RandomDeaths(m); }
~CoronaVirus() { CoronaVirus * again = new CoronaVirus((this->multi * 2)); }
int multi = 1;
} y_2020;
kung foo man (2nd September 2020)
How about equivalent offset? Is there an efficient way to recover them?
This whole thing
https://github.com/M-itch/libcod/blo...ions.hpp#L2138
kung foo man (8th September 2020)
In CoD2, I look for a text close to a function that uses the player client address and then find the same text in other versions.
This might work depending on much difference between 2 and UO.
Edit: you might be able to find some of the addresses if you find and decode one of the player GSC functions like GetStance() or getEntityNumber and the kick function too.
Last edited by Mitch; 6th September 2020 at 15:28.
kung foo man (8th September 2020)
Which functions, addresses and offsets are you currently still looking for?
Edit: maybe comparing CoD1 with UO is easier.
https://github.com/riicchhaarrd/CoDExtended
Edit 2:
CoD1 and UO are split into two: a binary (coduo_lnxded) and a library (game.mp.uo.i386.so).
The game library contains GSC script functions and methods.
I think the UO code in your screenshot loads the game library like in CoDExtended.
Loading the library
https://github.com/riicchhaarrd/CoDE...xtended.c#L257
https://github.com/riicchhaarrd/CoDE...ymodule.c#L231
Loading the stock functions:
https://github.com/riicchhaarrd/CoDE...script.c#L1862
Return the stock or custom function:
https://github.com/riicchhaarrd/CoDE.../script.c#L450