WopsS / RED4ext.SDK

A library to create mods for REDengine 4 (Cyberpunk 2077), independently of RED4ext.
MIT License
93 stars 31 forks source link

Zoltan typedefs #58

Open jac3km4 opened 2 years ago

jac3km4 commented 2 years ago

this is just a demo header that can be used with zoltan clang frontend the command to run on this is:

zoltan-clang '.\include\RED4ext\Typedefs.hpp' 'C:\Games\Cyberpunk 2077\bin\x64\Cyberpunk2077.exe' -f 'std=c++20' -f 'I.\include' --dwarf-output '.\debug-symbols' --c-output '.\addresses.h'

it generates a header with addresses like:

#define CBASEFUNCTION_EXECUTE_ADDR 0x140206A70
#define CGLOBALFUNCTION_CTOR_ADDR 0x140206380
...

and symbols that can be loaded into IDA:

image
WopsS commented 2 years ago

Can you move the file to a new directory? Maybe zoltan. If we do this people might get confused with the typedefs.

jac3km4 commented 2 years ago

the typedefs can replaced with c++-style using type aliases

WopsS commented 2 years ago

Nice! Does it also support namespaces? And custom math? Like CBaseFunction_Execute = addr - img_base so we get only the RVA?

jac3km4 commented 2 years ago

You can use namespaces on the latest version, I've also changed it to output rva in the output headers by default

WopsS commented 2 years ago

Nice! Thanks :D